Skip to content

Commit

Permalink
Merge branch 'master' into improve/AccessControl/internal-return-bool
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Jul 31, 2023
2 parents 3939cb4 + f631d8a commit 7dc7e62
Show file tree
Hide file tree
Showing 108 changed files with 1,756 additions and 1,005 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-walls-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---

`ERC1155Receiver`: Removed in favor of `ERC1155Holder`.
5 changes: 5 additions & 0 deletions .changeset/eight-peaches-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---

`Proxy`: Removed redundant `receive` function.
5 changes: 5 additions & 0 deletions .changeset/empty-taxis-kiss.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/fluffy-countries-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---

`Arrays`: Optimize `findUpperBound` by removing redundant SLOAD.
5 changes: 5 additions & 0 deletions .changeset/hot-dingos-kiss.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/proud-seals-complain.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/purple-cats-cheer.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/spicy-sheep-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---

`access`: Move `AccessControl` extensions to a dedicated directory.
5 changes: 5 additions & 0 deletions .changeset/strong-poems-thank.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/swift-numbers-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---

`Governor`, `Initializable`, and `UUPSUpgradeable`: Use internal functions in modifiers to optimize bytecode size.
5 changes: 5 additions & 0 deletions .changeset/tender-shirts-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---

`BeaconProxy`: Reject value in initialization unless a payable function is explicitly invoked.
5 changes: 5 additions & 0 deletions .changeset/unlucky-beans-obey.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/warm-guests-rule.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/wild-rockets-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---

`Math`: Renamed members of `Rounding` enum, and added a new rounding mode for "away from zero".
1 change: 0 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ jobs:
- uses: crytic/[email protected]
with:
node-version: 18.15
slither-version: 0.9.3

codespell:
runs-on: ubuntu-latest
Expand Down
15 changes: 0 additions & 15 deletions .solhint.json

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/con
$ forge install OpenZeppelin/openzeppelin-contracts
```

Add `@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/` in `remappings.txt.`

### Usage

Once installed, you can use the contracts in the library by importing them:
Expand Down
4 changes: 2 additions & 2 deletions certora/harnesses/DoubleEndedQueueHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ contract DoubleEndedQueueHarness {
_deque.clear();
}

function begin() external view returns (int128) {
function begin() external view returns (uint128) {
return _deque._begin;
}

function end() external view returns (int128) {
function end() external view returns (uint128) {
return _deque._end;
}

Expand Down
8 changes: 8 additions & 0 deletions certora/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ const argv = require('yargs')
type: 'number',
default: 4,
},
verbose: {
alias: 'v',
type: 'count',
default: 0,
},
options: {
alias: 'o',
type: 'array',
Expand Down Expand Up @@ -65,6 +70,9 @@ for (const { spec, contract, files, options = [] } of specs) {
// Run certora, aggregate the output and print it at the end
async function runCertora(spec, contract, files, options = []) {
const args = [...files, '--verify', `${contract}:certora/specs/${spec}.spec`, ...options];
if (argv.verbose) {
console.log('Running:', args.join(' '));
}
const child = proc.spawn('certoraRun', args);

const stream = new PassThrough();
Expand Down
Loading

0 comments on commit 7dc7e62

Please sign in to comment.