Skip to content

Commit

Permalink
Add IAragonApp
Browse files Browse the repository at this point in the history
  • Loading branch information
ßingen committed Jul 20, 2020
1 parent 4539f11 commit 1f65758
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
3 changes: 2 additions & 1 deletion contracts/apps/AppStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ pragma solidity ^0.4.24;

import "../common/UnstructuredStorage.sol";
import "../kernel/IKernel.sol";
import "./IAragonApp.sol";


contract AppStorage {
contract AppStorage is IAragonApp {
using UnstructuredStorage for bytes32;

/* Hardcoded constants to save gas
Expand Down
13 changes: 13 additions & 0 deletions contracts/apps/IAragonApp.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* SPDX-License-Identifier: MIT
*/

pragma solidity ^0.4.24;

import "../kernel/IKernel.sol";


contract IAragonApp {
function kernel() public view returns (IKernel);
function appId() public view returns (bytes32);
}
2 changes: 0 additions & 2 deletions contracts/apps/disputable/IDisputable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,4 @@ contract IDisputable is ERC165 {
function supportsInterface(bytes4 _interfaceId) external pure returns (bool) {
return _interfaceId == DISPUTABLE_INTERFACE_ID || _interfaceId == ERC165_INTERFACE_ID;
}

function appId() public view returns (bytes32);
}
20 changes: 10 additions & 10 deletions contracts/test/mocks/apps/disputable/DisputableAppMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ contract DisputableAppMock is DisputableAragonApp {
}

function interfaceID() external pure returns (bytes4) {
IDisputable iDisputable;
return iDisputable.setAgreement.selector ^
iDisputable.onDisputableActionChallenged.selector ^
iDisputable.onDisputableActionAllowed.selector ^
iDisputable.onDisputableActionRejected.selector ^
iDisputable.onDisputableActionVoided.selector ^
iDisputable.getAgreement.selector ^
iDisputable.canChallenge.selector ^
iDisputable.canClose.selector ^
iDisputable.appId.selector;
DisputableAragonApp disputableAragonApp;
return disputableAragonApp.setAgreement.selector ^
disputableAragonApp.onDisputableActionChallenged.selector ^
disputableAragonApp.onDisputableActionAllowed.selector ^
disputableAragonApp.onDisputableActionRejected.selector ^
disputableAragonApp.onDisputableActionVoided.selector ^
disputableAragonApp.getAgreement.selector ^
disputableAragonApp.canChallenge.selector ^
disputableAragonApp.canClose.selector ^
disputableAragonApp.appId.selector;
}

function erc165interfaceID() external pure returns (bytes4) {
Expand Down

0 comments on commit 1f65758

Please sign in to comment.