Skip to content

Commit

Permalink
T
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized committed Dec 2, 2024
1 parent 696b354 commit 6c2b604
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ accounts
├─ LibERC6551 — "Library for interacting with ERC6551 accounts"
├─ LibERC7579 — "Library for handling ERC7579 mode and execution data"
├─ Receiver — "Receiver mixin for ETH and safe-transferred ERC721 and ERC1155 tokens"
├─ Timelock — "Simple timelock"
auth
├─ Ownable — "Simple single owner authorization mixin"
├─ OwnableRoles — "Simple single owner and multiroles authorization mixin"
Expand Down
1 change: 1 addition & 0 deletions src/Milady.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "./accounts/ERC7821.sol";
import "./accounts/LibERC6551.sol";
import "./accounts/LibERC7579.sol";
import "./accounts/Receiver.sol";
import "./accounts/Timelock.sol";
import "./auth/Ownable.sol";
import "./auth/OwnableRoles.sol";
import "./auth/EnumerableRoles.sol";
Expand Down
20 changes: 8 additions & 12 deletions src/accounts/Timelock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,14 @@ contract Timelock is ERC7821, EnumerableRoles {
internal
virtual
{
uint256 j;
uint256 n = addresses.length << 5;
if (n != uint256(0)) {
do {
address a;
/// @solidity memory-safe-assembly
assembly {
a := calldataload(add(addresses.offset, j))
j := add(j, 0x20)
}
_setRole(a, role, active);
} while (j != n);
for (uint256 i; i != addresses.length;) {
address a;
/// @solidity memory-safe-assembly
assembly {
a := calldataload(add(addresses.offset, shl(5, i)))
i := add(i, 1)
}
_setRole(a, role, active);
}
}

Expand Down

0 comments on commit 6c2b604

Please sign in to comment.