Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
target: 'contracts/tools/testing/slither/'
solc-version: '0.8.21'
slither-args: --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
fail-on: none # TODO set this to high or other
fail-on: high
sarif: results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
Expand Down
11 changes: 11 additions & 0 deletions abis/contracts/interfaces/IexecPoco1.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[
{
"inputs": [
{
"internalType": "string",
"name": "reason",
"type": "string"
}
],
"name": "IncompatibleDatasetOrder",
"type": "error"
},
{
"anonymous": false,
"inputs": [
Expand Down
13 changes: 0 additions & 13 deletions abis/contracts/interfaces/IexecPoco1Errors.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"error IncompatibleDatasetOrder(string)",
"event DealSponsored(bytes32,address)",
"event OrdersMatched(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)",
"event SchedulerNotice(address indexed,bytes32)",
Expand Down

This file was deleted.

5 changes: 0 additions & 5 deletions contracts/IexecInterface.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ import {IexecEscrow} from "./interfaces/IexecEscrow.sol";
import {IexecEscrowEvents} from "./interfaces/IexecEscrowEvents.sol";
import {IexecOrderManagement} from "./interfaces/IexecOrderManagement.sol";
import {IexecPoco1} from "./interfaces/IexecPoco1.sol";
import {IexecPoco1Errors} from "./interfaces/IexecPoco1Errors.sol";
import {IexecPoco2} from "./interfaces/IexecPoco2.sol";
import {IexecPocoAccessors} from "./interfaces/IexecPocoAccessors.sol";
import {IexecRelay} from "./interfaces/IexecRelay.sol";
import {IexecTokenSpender} from "./interfaces/IexecTokenSpender.sol";
import {IOwnable} from "./interfaces/IOwnable.sol";

// TODO see if Diamond interfaces should be added here ??
// IDiamond, IDiamondLoupe, IDiamondCut, IERC165, IERC173 (ownership)

/**
* A global interface that aggregates all the interfaces needed to interact with
* the PoCo contracts.
Expand All @@ -39,7 +35,6 @@ interface IexecInterface is
IexecEscrowEvents,
IexecOrderManagement,
IexecPoco1,
IexecPoco1Errors,
IexecPoco2,
IexecPocoAccessors,
IexecRelay,
Expand Down
13 changes: 3 additions & 10 deletions contracts/abstract/FacetBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,14 @@

pragma solidity ^0.8.0;

import {LibDiamond} from "@mudgen/diamond-1/contracts/libraries/LibDiamond.sol";
import {PocoStorageLib} from "../libs/PocoStorageLib.sol";
import {IERC5313} from "@openzeppelin/contracts/interfaces/IERC5313.sol";

// TODO use LibDiamond.contractOwner() when migrating all contracts to v8.

/**
* @title Base contract of all Facet contracts.
* @dev Every facet must inherit from this contract.
* @dev Every facet should inherit from this contract.
*/
abstract contract FacetBase {
// TODO move these constants to a ConstantsLib library and reference them as
// ConstantsLib.<NAME> in the next PR.
// CommonLib redeclares GROUPMEMBER_PURPOSE temporarily.

// Poco - Constants
uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7;
uint256 internal constant REVEAL_DEADLINE_RATIO = 2;
Expand All @@ -39,8 +33,7 @@ abstract contract FacetBase {
}

function owner() internal view returns (address) {
// TODO use LibDiamond.contractOwner() instead of an external call when migrating all contracts to v8.
return IERC5313(address(this)).owner();
return LibDiamond.contractOwner();
}

function _msgSender() internal view returns (address) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/facets/IexecPoco1Facet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol";
import {IWorkerpool} from "../registries/workerpools/IWorkerpool.v8.sol";
import {PocoStorageLib} from "../libs/PocoStorageLib.sol";
import {IexecPoco1} from "../interfaces/IexecPoco1.sol";
import {IexecPoco1Errors} from "../interfaces/IexecPoco1Errors.sol";
import {FacetBase} from "../abstract/FacetBase.sol";
import {EscrowLib} from "../libs/EscrowLib.sol";
import {CommonLib} from "../libs/CommonLib.sol";
Expand All @@ -26,7 +25,7 @@ struct Matching {
bool hasDataset;
}

contract IexecPoco1Facet is IexecPoco1, IexecPoco1Errors, FacetBase {
contract IexecPoco1Facet is IexecPoco1, FacetBase {
using Math for uint256;
using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder;
using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder;
Expand Down
2 changes: 2 additions & 0 deletions contracts/interfaces/IexecPoco1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ pragma solidity ^0.8.0;
import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol";

interface IexecPoco1 {
error IncompatibleDatasetOrder(string reason);

event SchedulerNotice(address indexed workerpool, bytes32 dealid);
event OrdersMatched(
bytes32 dealid,
Expand Down
9 changes: 0 additions & 9 deletions contracts/interfaces/IexecPoco1Errors.sol

This file was deleted.

2 changes: 1 addition & 1 deletion docs/solidity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Changing the name or the path would cause a breaking change in the SDK._

## FacetBase

_Every facet must inherit from this contract._
_Every facet should inherit from this contract._

## IexecCategoryManagerFacet

Expand Down
Loading
Loading