pull/5074/head
RenanSouza2 8 months ago
parent 0519802043
commit 81929b689a
  1. 23
      contracts/access/manager/AuthorityUtils.sol

@ -17,21 +17,20 @@ library AuthorityUtils {
address target, address target,
bytes4 selector bytes4 selector
) internal view returns (bool immediate, uint32 delay) { ) internal view returns (bool immediate, uint32 delay) {
(bool success, ) = authority.staticcall(abi.encodeCall(IAuthority.canCall, (caller, target, selector))); bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));
if (success) {
/// @solidity memory-safe-assembly
assembly {
if gt(returndatasize(), 0x1f) {
if gt(returndatasize(), 0x3f) {
returndatacopy(0x00, 0x20, 0x20)
delay := mload(0x00)
}
returndatacopy(0, 0, 0x20) assembly {
immediate := mload(0x00) mstore(0x00, 0x00)
} mstore(0x20, 0x00)
let success := staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40)
if success {
immediate := mload(0x00)
delay := mload(0x20)
} }
} }
return (immediate, delay); return (immediate, delay);
} }
} }

Loading…
Cancel
Save