Skip to content

Commit c70b8d0

Browse files
authored
Merge branch 'master' into fix/1b-m-06
2 parents ecd30f6 + f715365 commit c70b8d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1037
-1535
lines changed

.changeset/brave-lobsters-punch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': major
3+
---
4+
5+
`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.

.changeset/fifty-owls-retire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': major
3+
---
4+
5+
`Address`: Removed the ability to customize error messages. A common custom error is always used if the underlying revert reason cannot be bubbled up.

.changeset/flat-bottles-wonder.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
'openzeppelin-solidity': minor
33
---
44

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

.changeset/hip-goats-fail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': patch
3+
---
4+
5+
`VestingWallet`: Fix revert during 1 second time window when duration is 0.

.changeset/wild-beds-visit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': major
3+
---
4+
5+
`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.

contracts/finance/VestingWallet.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ import {Ownable} from "../access/Ownable.sol";
2323
* Preventing this in a smart contract is difficult, considering that: 1) a beneficiary address could be a
2424
* counterfactually deployed contract, 2) there is likely to be a migration path for EOAs to become contracts in the
2525
* near future.
26+
*
27+
* NOTE: When using this contract with any token whose balance is adjusted automatically (i.e. a rebase token), make sure
28+
* to account the supply/balance adjustment in the vesting schedule to ensure the vested amount is as intended.
2629
*/
2730
contract VestingWallet is Context, Ownable {
2831
event EtherReleased(uint256 amount);
@@ -151,7 +154,7 @@ contract VestingWallet is Context, Ownable {
151154
function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) {
152155
if (timestamp < start()) {
153156
return 0;
154-
} else if (timestamp > end()) {
157+
} else if (timestamp >= end()) {
155158
return totalAllocation;
156159
} else {
157160
return (totalAllocation * (timestamp - start())) / duration();

0 commit comments

Comments
 (0)