Commit f9cdbd7d by github-actions

Transpile e8d744a9

parent 88ee64b9
...@@ -111,7 +111,7 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, ...@@ -111,7 +111,7 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable,
* *
* The format of the revert reason is given by the following regular expression: * The format of the revert reason is given by the following regular expression:
* *
* /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
* *
* _Available since v4.1._ * _Available since v4.1._
*/ */
...@@ -139,7 +139,7 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, ...@@ -139,7 +139,7 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable,
* *
* The format of the revert reason is given by the following regular expression: * The format of the revert reason is given by the following regular expression:
* *
* /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/ */
function _checkRole(bytes32 role, address account) internal view { function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) { if (!hasRole(role, account)) {
...@@ -239,8 +239,9 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, ...@@ -239,8 +239,9 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable,
* Emits a {RoleAdminChanged} event. * Emits a {RoleAdminChanged} event.
*/ */
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, getRoleAdmin(role), adminRole); bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole; _roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
} }
function _grantRole(bytes32 role, address account) private { function _grantRole(bytes32 role, address account) private {
......
...@@ -110,10 +110,10 @@ abstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable ...@@ -110,10 +110,10 @@ abstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable
function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) { function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {
// We run a binary search to look for the earliest checkpoint taken after `blockNumber`. // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.
// //
// During the loop, the index of the wanted checkpoint remains in the range [low, high). // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).
// With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.
// - If the middle checkpoint is after `blockNumber`, we look in [low, mid) // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)
// - If the middle checkpoint is before `blockNumber`, we look in [mid+1, high) // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)
// Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not
// out of bounds (in which case we're looking too far in the past and the result is 0). // out of bounds (in which case we're looking too far in the past and the result is 0).
// Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is
......
...@@ -20,7 +20,7 @@ import "../../proxy/utils/Initializable.sol"; ...@@ -20,7 +20,7 @@ import "../../proxy/utils/Initializable.sol";
* to the escrow's deposit and withdraw. * to the escrow's deposit and withdraw.
*/ */
contract EscrowUpgradeable is Initializable, OwnableUpgradeable { contract EscrowUpgradeable is Initializable, OwnableUpgradeable {
function initialize() public virtual initializer { function initialize public virtual initializer {
__Escrow_init(); __Escrow_init();
} }
function __Escrow_init() internal initializer { function __Escrow_init() internal initializer {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment