Merge branch 'master' into feat/access-manager

pull/4416/head^2
Francisco Giordano 2 years ago
commit 1169bb1e51
  1. 5
      .changeset/afraid-walls-smell.md
  2. 5
      .changeset/angry-ties-switch.md
  3. 5
      .changeset/beige-buses-drop.md
  4. 4
      .changeset/big-plums-cover.md
  5. 5
      .changeset/blue-horses-do.md
  6. 5
      .changeset/blue-scissors-design.md
  7. 5
      .changeset/brave-lobsters-punch.md
  8. 5
      .changeset/bright-tomatoes-sing.md
  9. 5
      .changeset/chilled-spiders-attack.md
  10. 5
      .changeset/clever-pumas-beg.md
  11. 5
      .changeset/curvy-shrimps-enjoy.md
  12. 5
      .changeset/curvy-suns-sort.md
  13. 5
      .changeset/early-oranges-raise.md
  14. 5
      .changeset/eight-peaches-guess.md
  15. 5
      .changeset/eighty-crabs-listen.md
  16. 5
      .changeset/empty-taxis-kiss.md
  17. 5
      .changeset/famous-rules-burn.md
  18. 5
      .changeset/fifty-owls-retire.md
  19. 5
      .changeset/five-ducks-develop.md
  20. 5
      .changeset/five-poets-mix.md
  21. 7
      .changeset/flat-bottles-wonder.md
  22. 5
      .changeset/flat-deers-end.md
  23. 5
      .changeset/fluffy-countries-buy.md
  24. 5
      .changeset/four-adults-knock.md
  25. 5
      .changeset/four-bats-sniff.md
  26. 5
      .changeset/fresh-birds-kiss.md
  27. 5
      .changeset/funny-rockets-compete.md
  28. 5
      .changeset/gold-chicken-clean.md
  29. 5
      .changeset/grumpy-bulldogs-call.md
  30. 5
      .changeset/grumpy-worms-tease.md
  31. 5
      .changeset/happy-falcons-walk.md
  32. 5
      .changeset/happy-socks-travel.md
  33. 5
      .changeset/healthy-gorillas-applaud.md
  34. 5
      .changeset/healthy-squids-stare.md
  35. 5
      .changeset/heavy-drinks-fail.md
  36. 5
      .changeset/hip-beds-provide.md
  37. 5
      .changeset/hip-goats-fail.md
  38. 5
      .changeset/hot-coins-judge.md
  39. 5
      .changeset/hot-dingos-kiss.md
  40. 5
      .changeset/hot-plums-approve.md
  41. 5
      .changeset/lemon-dogs-kiss.md
  42. 5
      .changeset/little-falcons-build.md
  43. 5
      .changeset/little-kiwis-ring.md
  44. 5
      .changeset/loud-shrimps-play.md
  45. 5
      .changeset/lovely-dragons-appear.md
  46. 5
      .changeset/lovely-geckos-hide.md
  47. 5
      .changeset/many-panthers-hide.md
  48. 5
      .changeset/mean-walls-watch.md
  49. 6
      .changeset/mighty-donuts-smile.md
  50. 5
      .changeset/modern-games-exist.md
  51. 5
      .changeset/new-ways-own.md
  52. 5
      .changeset/ninety-hornets-kick.md
  53. 5
      .changeset/orange-apes-draw.md
  54. 5
      .changeset/perfect-insects-listen.md
  55. 5
      .changeset/pink-suns-mix.md
  56. 5
      .changeset/popular-deers-raise.md
  57. 5
      .changeset/pretty-hornets-play.md
  58. 5
      .changeset/proud-comics-deliver.md
  59. 5
      .changeset/proud-seals-complain.md
  60. 5
      .changeset/purple-cats-cheer.md
  61. 5
      .changeset/red-dots-fold.md
  62. 5
      .changeset/rotten-insects-wash.md
  63. 5
      .changeset/serious-books-lie.md
  64. 5
      .changeset/short-eels-enjoy.md
  65. 5
      .changeset/short-roses-judge.md
  66. 5
      .changeset/silent-dancers-type.md
  67. 7
      .changeset/silly-bees-beam.md
  68. 5
      .changeset/sixty-numbers-reply.md
  69. 5
      .changeset/slimy-knives-hug.md
  70. 5
      .changeset/slimy-penguins-attack.md
  71. 5
      .changeset/small-cars-appear.md
  72. 5
      .changeset/small-terms-sleep.md
  73. 5
      .changeset/smooth-books-wink.md
  74. 5
      .changeset/spicy-sheep-eat.md
  75. 5
      .changeset/spotty-hotels-type.md
  76. 5
      .changeset/strong-bulldogs-buy.md
  77. 5
      .changeset/strong-poems-thank.md
  78. 5
      .changeset/swift-bags-divide.md
  79. 5
      .changeset/swift-numbers-cry.md
  80. 5
      .changeset/tame-ladybugs-sit.md
  81. 5
      .changeset/tasty-tomatoes-turn.md
  82. 5
      .changeset/tender-needles-dance.md
  83. 5
      .changeset/tender-shirts-turn.md
  84. 5
      .changeset/thin-camels-matter.md
  85. 5
      .changeset/thin-dragons-report.md
  86. 5
      .changeset/thirty-swans-exercise.md
  87. 5
      .changeset/tough-drinks-hammer.md
  88. 5
      .changeset/two-wasps-punch.md
  89. 5
      .changeset/unlucky-beans-obey.md
  90. 5
      .changeset/violet-dancers-cough.md
  91. 5
      .changeset/violet-frogs-hide.md
  92. 5
      .changeset/warm-guests-rule.md
  93. 5
      .changeset/warm-masks-obey.md
  94. 5
      .changeset/wild-beds-visit.md
  95. 5
      .changeset/wild-rockets-rush.md
  96. 5
      .changeset/wild-windows-trade.md
  97. 5
      .changeset/yellow-swans-cover.md
  98. 39
      .github/workflows/checks.yml
  99. 20
      .github/workflows/formal-verification.yml
  100. 8
      .github/workflows/release-cycle.yml
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ERC1155Receiver`: Removed in favor of `ERC1155Holder`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`TimelockController`: Changed the role architecture to use `DEFAULT_ADMIN_ROLE` as the admin for all roles, instead of the bespoke `TIMELOCK_ADMIN_ROLE` that was used previously. This aligns with the general recommendation for `AccessControl` and makes the addition of new roles easier. Accordingly, the `admin` parameter and timelock will now be granted `DEFAULT_ADMIN_ROLE` instead of `TIMELOCK_ADMIN_ROLE`. ([#3799](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3799))

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`Initializable`: optimize `_disableInitializers` by using `!=` instead of `<`. ([#3787](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3787))

@ -0,0 +1,4 @@
---
'openzeppelin-solidity': major
---
Use `abi.encodeCall` in place of `abi.encodeWithSelector` and `abi.encodeWithSignature` for improved type-checking of parameters

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ERC2771Forwarder`: Added `deadline` for expiring transactions, batching, and more secure handling of `msg.value`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`Math`: Make `ceilDiv` to revert on 0 division even if the numerator is 0

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Governor`: Refactored internals to implement common queuing logic in the core module of the Governor. Added `queue` and `_queueOperations` functions that act at different levels. Modules that implement queuing via timelocks are expected to override `_queueOperations` to implement the timelock-specific logic. Added `_executeOperations` as the equivalent for execution.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ERC20`, `ERC1155`: Deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks, added a new internal `_update` function for customizations, and refactored all extensions using those hooks to use `_update` instead. ([#3838](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3838), [#3876](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3876))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ERC1155Supply`: add a `totalSupply()` function that returns the total amount of token circulating, this change will restrict the total tokens minted across all ids to 2\*\*256-1 .

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Ownable`: Add an `initialOwner` parameter to the constructor, making the ownership initialization explicit.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ReentrancyGuard`: Add a `_reentrancyGuardEntered` function to expose the guard status. ([#3714](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3714))

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`Ownable2Step`: make `acceptOwnership` public virtual to enable usecases that require overriding it. ([#3960](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3960))

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ERC721Wrapper`: add a new extension of the `ERC721` token which wraps an underlying token. Deposit and withdraw guarantee that the ownership of each token is backed by a corresponding underlying token with the same identifier.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`Proxy`: Removed redundant `receive` function.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
Optimize `Strings.equal`

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`UUPSUpgradeable`, `TransparentUpgradeableProxy` and `ProxyAdmin`: Removed `upgradeTo` and `upgrade` functions, and made `upgradeToAndCall` and `upgradeAndCall` ignore the data argument if it is empty. It is no longer possible to invoke the receive function (or send value with empty data) along with an upgrade.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`EnumerableMap`: add a `keys()` function that returns an array containing all the keys. ([#3920](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3920))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Address`: Removed the ability to customize error messages. A common custom error is always used if the underlying revert reason cannot be bubbled up.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`UUPSUpgradeable.sol`: Change visibility to the functions `upgradeTo ` and `upgradeToAndCall ` from `external` to `public`.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`TimelockController`: Add the `CallSalt` event to emit on operation schedule.

@ -0,0 +1,7 @@
---
'openzeppelin-solidity': minor
---
Replace some uses of `abi.encodePacked` with clearer alternatives (e.g. `bytes.concat`, `string.concat`). (#4504)[https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4504]
pr: #4296

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`Governor`: add a public `cancel(uint256)` function.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`Arrays`: Optimize `findUpperBound` by removing redundant SLOAD.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`ECDSA`: Use unchecked arithmetic for the `tryRecover` function that receives the `r` and `vs` short-signature fields separately.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`Governor`: Enable timestamp operation for blockchains without a stable block time. This is achieved by connecting a Governor's internal clock to match a voting token's EIP-6372 interface.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Checkpoints`: library moved from `utils` to `utils/structs`

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
Reformatted codebase with latest version of Prettier Solidity. ([#3898](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3898))

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`Strings`: add `equal` method. ([#3774](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3774))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Governor`: Optimized use of storage for proposal data

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ERC1967Utils`: Refactor the `ERC1967Upgrade` abstract contract as a library.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`TransparentUpgradeableProxy`: Admin is now stored in an immutable variable (set during construction) to avoid unnecessary storage reads on every proxy call. This removed the ability to ever change the admin. Transfer of the upgrade capability is exclusively handled through the ownership of the `ProxyAdmin`.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`IERC5313`: Add an interface for EIP-5313 that is now final.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`VestingWallet`: Use `Ownable` instead of an immutable `beneficiary`.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`Math`: optimize `log256` rounding check. ([#3745](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3745))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ERC20`: Remove `Approval` event previously emitted in `transferFrom` to indicate that part of the allowance was consumed. With this change, allowances are no longer reconstructible from events. See the code for guidelines on how to re-enable this event if needed.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
Move the logic to validate ERC-1822 during an upgrade from `ERC1967Utils` to `UUPSUpgradeable`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`VestingWallet`: Fix revert during 1 second time window when duration is 0.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`Arrays`: Add `unsafeMemoryAccess` helpers to read from a memory array without checking the length.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`MessageHashUtils`: Add a new library for creating message digest to be used along with signing or recovery such as ECDSA or ERC-1271. These functions are moved from the `ECDSA` library.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`GovernorTimelockControl`: Clean up timelock id on execution for gas refund.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`ERC20Votes`: optimize by using unchecked arithmetic. ([#3748](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3748))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`EIP712`: Add internal getters for the name and version strings

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`Multicall`: annotate `multicall` function as upgrade safe to not raise a flag for its delegatecall. ([#3961](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3961))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`TimelockController`: Add a state getter that returns an `OperationState` enum.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`IERC4906`: Add an interface for ERC-4906 that is now Final.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
Replace revert strings and require statements with custom errors.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`TransparentUpgradeableProxy`: support value passthrough for all ifAdmin function.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Nonces`: Added a new contract to keep track of user nonces. Used for signatures in `ERC20Permit`, `ERC20Votes`, and `ERC721Votes`. ([#3816](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3816))

@ -0,0 +1,6 @@
---
'openzeppelin-solidity': patch
---
`Governor`: Add validation in ERC1155 and ERC721 receiver hooks to ensure Governor is the executor.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`StorageSlot`: Add support for `string` and `bytes`.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`ERC20Pausable`, `ERC721Pausable`, `ERC1155Pausable`: Add note regarding missing public pausing functionality

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`Votes`, `ERC20Votes`, `ERC721Votes`: support timestamp checkpointing using EIP-6372.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
Switched to using explicit Solidity import statements. Some previously available symbols may now have to be separately imported.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ERC4626`: Add mitigation to the inflation attack through virtual shares and assets.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`Math`: Optimized stack operations in `mulDiv`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Governor`: Add support for casting votes with ERC-1271 signatures by using a `bytes memory signature` instead of `r`, `s` and `v` arguments in the `castVoteBySig` and `castVoteWithReasonAndParamsBySig` functions.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`Strings`: add `toString` method for signed integers. ([#3773](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3773))

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ERC20Wrapper`: Make the `underlying` variable private and add a public accessor.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`BeaconProxy`: Use an immutable variable to store the address of the beacon. It is no longer possible for a `BeaconProxy` to upgrade by changing to another beacon.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`GovernorTimelockControl`: Add the Governor instance address as part of the TimelockController operation `salt` to avoid operation id collisions between governors using the same TimelockController.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
Overrides are now used internally for a number of functions that were previously hardcoded to their default implementation in certain locations: `ERC1155Supply.totalSupply`, `ERC721.ownerOf`, `ERC721.balanceOf` and `ERC721.totalSupply` in `ERC721Enumerable`, `ERC20.totalSupply` in `ERC20FlashMint`, and `ERC1967._getImplementation` in `ERC1967Proxy`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ProxyAdmin`: Removed `getProxyAdmin` and `getProxyImplementation` getters. ([#3820](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3820))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`ERC1155`: Optimize array allocation.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
Bump minimum compiler version required to 0.8.20

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`EIP712`: add EIP-5267 support for better domain discovery.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`AccessControlDefaultAdminRules`: Add an extension of `AccessControl` with additional security rules for the `DEFAULT_ADMIN_ROLE`.

@ -0,0 +1,7 @@
---
'openzeppelin-solidity': major
---
`ERC20Votes`: Changed internal vote accounting to reusable `Votes` module previously used by `ERC721Votes`. Removed implicit `ERC20Permit` inheritance. Note that the `DOMAIN_SEPARATOR` getter was previously guaranteed to be available for `ERC20Votes` contracts, but is no longer available unless `ERC20Permit` is explicitly used; ERC-5267 support is included in `ERC20Votes` with `EIP712` and is recommended as an alternative.
pr: #3816

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Governor`: Add `voter` and `nonce` parameters in signed ballots, to avoid forging signatures for random addresses, prevent signature replay, and allow invalidating signatures. Add `voter` as a new parameter in the `castVoteBySig` and `castVoteWithReasonAndParamsBySig` functions.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`SignatureChecker`: Add `isValidERC1271SignatureNow` for checking a signature directly against a smart contract using ERC-1271.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`TransparentUpgradeableProxy`: Removed `admin` and `implementation` getters, which were only callable by the proxy owner and thus not very useful. ([#3820](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3820))

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`ECDSA`: Add a function `toDataWithIntendedValidatorHash` that encodes data with version 0x00 following EIP-191.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`SafeERC20`: Add a `forceApprove` function to improve compatibility with tokens behaving like USDT.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`ERC1155`: Remove check for address zero in `balanceOf`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`access`: Move `AccessControl` extensions to a dedicated directory.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`ERC721Consecutive`: Add a `_firstConsecutiveId` internal function that can be overridden to change the id of the first token minted through `_mintConsecutive`.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ERC1967Upgrade`: removed contract-wide `oz-upgrades-unsafe-allow delegatecall` annotation, replaced by granular annotation in `UUPSUpgradeable`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`DoubleEndedQueue`: refactor internal structure to use `uint128` instead of `int128`. This has no effect on the library interface.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`Governor`: Add a mechanism to restrict the address of the proposer using a suffix in the description.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`Governor`, `Initializable`, and `UUPSUpgradeable`: Use internal functions in modifiers to optimize bytecode size.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': patch
---
`MerkleProof`: optimize by using unchecked arithmetic. ([#3745](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3745))

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Strings`: Rename `toString(int256)` to `toStringSigned(int256)`.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ERC20Wrapper`: self wrapping and deposit by the wrapper itself are now explicitelly forbiden.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`BeaconProxy`: Reject value in initialization unless a payable function is explicitly invoked.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`ERC1155`: Bubble errors triggered in the `onERC1155Received` and `onERC1155BatchReceived` hooks.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ECDSA`: optimize bytes32 computation by using assembly instead of `abi.encodePacked`.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ERC721URIStorage`: Emit ERC-4906 `MetadataUpdate` in `_setTokenURI`.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`ERC1155`: Optimize array accesses by skipping bounds checking when unnecessary.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`AccessControl`: Add a boolean return value to the internal `_grantRole` and `_revokeRole` functions indicating whether the role was granted or revoked.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`ERC2771Context`: Return the forwarder address whenever the `msg.data` of a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. `msg.data.length` is less than 20 bytes), as specified by ERC-2771.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
Remove the `override` specifier from functions that only override a single interface function.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`ShortStrings`: Added a library for handling short strings in a gas efficient way, with fallback to storage for longer strings.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---
`ERC2771Context`: Prevent revert in `_msgData()` when a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. `msg.data.length` is less than 20 bytes). Return the full calldata in that case.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`SignatureChecker`: Allow return data length greater than 32 from EIP-1271 signers.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`GovernorStorage`: Added a new governor extension that stores the proposal details in storage, with an interface that operates on `proposalId`, as well as proposal enumerability. This replaces the old `GovernorCompatibilityBravo` module.

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`Math`: Renamed members of `Rounding` enum, and added a new rounding mode for "away from zero".

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`SafeERC20`: Refactor `safeDecreaseAllowance` and `safeIncreaseAllowance` to support USDT-like tokens.

@ -1,5 +0,0 @@
---
'openzeppelin-solidity': minor
---
`UUPSUpgradeable`: added granular `oz-upgrades-unsafe-allow-reachable` annotation to improve upgrade safety checks on latest version of the Upgrades Plugins (starting with `@openzeppelin/upgrades-core@1.21.0`).

@ -4,6 +4,7 @@ on:
push:
branches:
- master
- next-v*
- release-v*
pull_request: {}
workflow_dispatch: {}
@ -12,9 +13,11 @@ concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true
env:
NODE_OPTIONS: --max_old_space_size=5120
jobs:
lint:
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ -26,7 +29,6 @@ jobs:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
NODE_OPTIONS: --max_old_space_size=4096
GAS: true
steps:
- uses: actions/checkout@v3
@ -37,19 +39,34 @@ jobs:
- name: Check linearisation of the inheritance graph
run: npm run test:inheritance
- name: Check proceduraly generated contracts are up-to-date
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
run: npm run test:generation
- name: Compare gas costs
uses: ./.github/actions/gas-compare
with:
token: ${{ github.token }}
tests-upgradeable:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Include history so patch conflicts are resolved automatically
- name: Set up environment
uses: ./.github/actions/setup
- name: Transpile to upgradeable
run: bash scripts/upgradeable/transpile.sh
- name: Run tests
run: npm run test
- name: Check linearisation of the inheritance graph
run: npm run test:inheritance
- name: Check storage layout
uses: ./.github/actions/storage-layout
with:
token: ${{ github.token }}
foundry-tests:
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
tests-foundry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ -63,19 +80,17 @@ jobs:
run: forge test -vv
coverage:
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- run: npm run coverage
env:
NODE_OPTIONS: --max_old_space_size=4096
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
slither:
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ -83,14 +98,16 @@ jobs:
uses: ./.github/actions/setup
- run: rm foundry.toml
- uses: crytic/slither-action@v0.3.0
with:
node-version: 18.15
codespell:
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run CodeSpell
uses: codespell-project/actions-codespell@v1.0
uses: codespell-project/actions-codespell@v2.0
with:
check_hidden: true
check_filenames: true
skip: package-lock.json,*.pdf

@ -1,10 +1,6 @@
name: formal verification
on:
push:
branches:
- master
- release-v*
pull_request:
types:
- opened
@ -16,7 +12,7 @@ on:
env:
PIP_VERSION: '3.10'
JAVA_VERSION: '11'
SOLC_VERSION: '0.8.19'
SOLC_VERSION: '0.8.20'
concurrency: ${{ github.workflow }}-${{ github.ref }}
@ -33,8 +29,20 @@ jobs:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'formal-verification')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up environment
uses: ./.github/actions/setup
- name: identify specs that need to be run
id: arguments
run: |
if [[ ${{ github.event_name }} = 'pull_request' ]];
then
RESULT=$(git diff ${{ github.event.pull_request.head.sha }}..${{ github.event.pull_request.base.sha }} --name-only certora/specs/*.spec | while IFS= read -r file; do [[ -f $file ]] && basename "${file%.spec}"; done | tr "\n" " ")
else
RESULT='--all'
fi
echo "result=$RESULT" >> "$GITHUB_OUTPUT"
- name: Install python
uses: actions/setup-python@v4
with:
@ -55,6 +63,6 @@ jobs:
- name: Verify specification
run: |
make -C certora apply
node certora/run.js >> "$GITHUB_STEP_SUMMARY"
node certora/run.js ${{ steps.arguments.outputs.result }} >> "$GITHUB_STEP_SUMMARY"
env:
CERTORAKEY: ${{ secrets.CERTORAKEY }}

@ -192,6 +192,8 @@ jobs:
pull-requests: write
if: needs.state.outputs.merge == 'true'
runs-on: ubuntu-latest
env:
MERGE_BRANCH: merge/${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
with:
@ -200,7 +202,9 @@ jobs:
uses: ./.github/actions/setup
- run: bash scripts/git-user-config.sh
- name: Create branch to merge
run: bash scripts/release/workflow/prepare-release-merge.sh
run: |
git checkout -B "$MERGE_BRANCH" "$GITHUB_REF_NAME"
git push -f origin "$MERGE_BRANCH"
- name: Create PR back to master
uses: actions/github-script@v6
with:
@ -208,7 +212,7 @@ jobs:
await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head: 'merge/${{ github.ref_name }}',
head: process.env.MERGE_BRANCH,
base: 'master',
title: '${{ format('Merge {0} branch', github.ref_name) }}'
});

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save