Skip to content

Commit ff52bb7

Browse files
facuspagnuoloizqui
andauthored
Apply suggestions from @izqui
Co-Authored-By: Jorge Izquierdo <izqui97@gmail.com>
1 parent 6ab5f69 commit ff52bb7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

contracts/apps/AragonApp.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ contract AragonApp is AppStorage, Autopetrified, VaultRecoverable, ReentrancyGua
3939
bytes memory callData = abi.encodeWithSelector(selector, appId(), address(this));
4040
bool success = address(_kernel).call(callData);
4141

42-
// perform a check only if kernel supports "shouldDenyCallingApp" method
42+
// if the call to `kernel.shouldDenyCallingApp` reverts (using an old Kernel) we consider that
43+
// there is no kill switch and the call should be allowed to continue
4344
if (success) {
4445
uint256 _outputLength;
4546
assembly { _outputLength := returndatasize }
@@ -49,8 +50,8 @@ contract AragonApp is AppStorage, Autopetrified, VaultRecoverable, ReentrancyGua
4950
bool _shouldDenyCall;
5051
assembly {
5152
let ptr := mload(0x40) // get next free memory pointer
52-
mstore(0x40, add(ptr, returndatasize)) // set next free memory pointer
53-
returndatacopy(ptr, 0, returndatasize) // copy call return value
53+
mstore(0x40, add(ptr, 0x20)) // set next free memory pointer
54+
returndatacopy(ptr, 0, 0x20) // copy call return value
5455
_shouldDenyCall := mload(ptr) // read data
5556
}
5657
require(!_shouldDenyCall, ERROR_CONTRACT_CALL_NOT_ALLOWED);

contracts/factory/DAOFactory.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ contract DAOFactory {
122122
acl.removePermissionManager(killSwitch, setAllowedInstancesRole);
123123
}
124124

125-
function _setupNewDaoPermissions(Kernel _dao, address _root) internal {
125+
function _setupEVMScriptRegistry(Kernel _dao, address _root) internal {
126126
// grant permissions to script registry factory
127127
_grantCreatePermissionsRole(_dao, scriptsRegistryFactory);
128128
_createAppManagerRole(_dao, scriptsRegistryFactory);

0 commit comments

Comments
 (0)