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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## vNEXT

- Migrate proxy to Diamond pattern (ERC-2535):
- Format all solidity files (#233)
- Rename ERC1538 architure to diamond Proxy architecture(#226, #229, #230)
- Remove ENS module (#225)
- Add Diamond contract unit tests (#224)
Expand Down
17 changes: 1 addition & 16 deletions contracts/IexecInterfaceNative.sol
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
******************************************************************************/

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

Expand Down
17 changes: 1 addition & 16 deletions contracts/IexecInterfaceNativeABILegacy.sol
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
******************************************************************************/

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

Expand Down
17 changes: 1 addition & 16 deletions contracts/IexecInterfaceToken.sol
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
******************************************************************************/

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

Expand Down
17 changes: 1 addition & 16 deletions contracts/IexecInterfaceTokenABILegacy.sol
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
******************************************************************************/

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

Expand Down
83 changes: 41 additions & 42 deletions contracts/Store.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.6.0;
Expand All @@ -25,51 +25,50 @@ import "./registries/IRegistry.sol";

// TODO replace with diamond AppStorage using namespaced storage.
// TODO check storage padding.
abstract contract Store
{
// Registries
IRegistry internal m_appregistry;
IRegistry internal m_datasetregistry;
IRegistry internal m_workerpoolregistry;
abstract contract Store {
// Registries
IRegistry internal m_appregistry;
IRegistry internal m_datasetregistry;
IRegistry internal m_workerpoolregistry;

// Escrow
IERC20 internal m_baseToken;
string internal m_name;
string internal m_symbol;
uint8 internal m_decimals;
uint256 internal m_totalSupply;
mapping (address => uint256 ) internal m_balances;
mapping (address => uint256 ) internal m_frozens;
mapping (address => mapping (address => uint256)) internal m_allowances;
// Escrow
IERC20 internal m_baseToken;
string internal m_name;
string internal m_symbol;
uint8 internal m_decimals;
uint256 internal m_totalSupply;
mapping(address => uint256) internal m_balances;
mapping(address => uint256) internal m_frozens;
mapping(address => mapping(address => uint256)) internal m_allowances;

// Poco - Constants
uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7;
uint256 internal constant REVEAL_DEADLINE_RATIO = 2;
uint256 internal constant FINAL_DEADLINE_RATIO = 10;
uint256 internal constant WORKERPOOL_STAKE_RATIO = 30;
uint256 internal constant KITTY_RATIO = 10;
uint256 internal constant KITTY_MIN = 1000000000; // ADJUSTEMENT VARIABLE
address internal constant KITTY_ADDRESS = 0x99c2268479b93fDe36232351229815DF80837e23; // address(uint256(keccak256(bytes('iExecKitty'))) - 1);
uint256 internal constant GROUPMEMBER_PURPOSE = 4;
bytes32 internal EIP712DOMAIN_SEPARATOR;
// Poco - Constants
uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7;
uint256 internal constant REVEAL_DEADLINE_RATIO = 2;
uint256 internal constant FINAL_DEADLINE_RATIO = 10;
uint256 internal constant WORKERPOOL_STAKE_RATIO = 30;
uint256 internal constant KITTY_RATIO = 10;
uint256 internal constant KITTY_MIN = 1000000000; // ADJUSTEMENT VARIABLE
address internal constant KITTY_ADDRESS = 0x99c2268479b93fDe36232351229815DF80837e23; // address(uint256(keccak256(bytes('iExecKitty'))) - 1);
uint256 internal constant GROUPMEMBER_PURPOSE = 4;
bytes32 internal EIP712DOMAIN_SEPARATOR;

// Poco - Storage
mapping(bytes32 => address ) internal m_presigned; // per order
mapping(bytes32 => uint256 ) internal m_consumed; // per order
mapping(bytes32 => IexecLibCore_v5.Deal ) internal m_deals; // per deal
mapping(bytes32 => IexecLibCore_v5.Task ) internal m_tasks; // per task
mapping(bytes32 => IexecLibCore_v5.Consensus ) internal m_consensus; // per task
mapping(bytes32 => mapping(address => IexecLibCore_v5.Contribution)) internal m_contributions; // per task-worker
mapping(address => uint256 ) internal m_workerScores; // per worker
// Poco - Storage
mapping(bytes32 => address) internal m_presigned; // per order
mapping(bytes32 => uint256) internal m_consumed; // per order
mapping(bytes32 => IexecLibCore_v5.Deal) internal m_deals; // per deal
mapping(bytes32 => IexecLibCore_v5.Task) internal m_tasks; // per task
mapping(bytes32 => IexecLibCore_v5.Consensus) internal m_consensus; // per task
mapping(bytes32 => mapping(address => IexecLibCore_v5.Contribution)) internal m_contributions; // per task-worker
mapping(address => uint256) internal m_workerScores; // per worker

// Poco - Settings
address internal m_teebroker;
uint256 internal m_callbackgas;
// Poco - Settings
address internal m_teebroker;
uint256 internal m_callbackgas;

// Categories
IexecLibCore_v5.Category[] internal m_categories;
// Categories
IexecLibCore_v5.Category[] internal m_categories;

// Backward compatibility
IexecHubInterface internal m_v3_iexecHub;
mapping(address => bool) internal m_v3_scoreImported;
// Backward compatibility
IexecHubInterface internal m_v3_iexecHub;
mapping(address => bool) internal m_v3_scoreImported;
}
2 changes: 1 addition & 1 deletion contracts/Store.v8.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-FileCopyrightText: 2023-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.0;
Expand Down
17 changes: 1 addition & 16 deletions contracts/external/interfaces/IERC734.sol
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
// SPDX-FileCopyrightText: 2023-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2023 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
******************************************************************************/

pragma solidity ^0.8.0;

/**
Expand Down
33 changes: 9 additions & 24 deletions contracts/libs/IexecLibOrders_v5.sol
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
******************************************************************************/

pragma solidity >=0.6.0;
pragma experimental ABIEncoderV2;

library IexecLibOrders_v5 {
// bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');
// bytes32 public constant APPORDER_TYPEHASH = keccak256('AppOrder(address app,uint256 appprice,uint256 volume,bytes32 tag,address datasetrestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant DATASETORDER_TYPEHASH = keccak256('DatasetOrder(address dataset,uint256 datasetprice,uint256 volume,bytes32 tag,address apprestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant WORKERPOOLORDER_TYPEHASH = keccak256('WorkerpoolOrder(address workerpool,uint256 workerpoolprice,uint256 volume,bytes32 tag,uint256 category,uint256 trust,address apprestrict,address datasetrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant REQUESTORDER_TYPEHASH = keccak256('RequestOrder(address app,uint256 appmaxprice,address dataset,uint256 datasetmaxprice,address workerpool,uint256 workerpoolmaxprice,address requester,uint256 volume,bytes32 tag,uint256 category,uint256 trust,address beneficiary,address callback,string params,bytes32 salt)');
// bytes32 public constant APPORDEROPERATION_TYPEHASH = keccak256('AppOrderOperation(AppOrder order,uint256 operation)AppOrder(address app,uint256 appprice,uint256 volume,bytes32 tag,address datasetrestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant DATASETORDEROPERATION_TYPEHASH = keccak256('DatasetOrderOperation(DatasetOrder order,uint256 operation)DatasetOrder(address dataset,uint256 datasetprice,uint256 volume,bytes32 tag,address apprestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');
// bytes32 public constant APPORDER_TYPEHASH = keccak256('AppOrder(address app,uint256 appprice,uint256 volume,bytes32 tag,address datasetrestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant DATASETORDER_TYPEHASH = keccak256('DatasetOrder(address dataset,uint256 datasetprice,uint256 volume,bytes32 tag,address apprestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant WORKERPOOLORDER_TYPEHASH = keccak256('WorkerpoolOrder(address workerpool,uint256 workerpoolprice,uint256 volume,bytes32 tag,uint256 category,uint256 trust,address apprestrict,address datasetrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant REQUESTORDER_TYPEHASH = keccak256('RequestOrder(address app,uint256 appmaxprice,address dataset,uint256 datasetmaxprice,address workerpool,uint256 workerpoolmaxprice,address requester,uint256 volume,bytes32 tag,uint256 category,uint256 trust,address beneficiary,address callback,string params,bytes32 salt)');
// bytes32 public constant APPORDEROPERATION_TYPEHASH = keccak256('AppOrderOperation(AppOrder order,uint256 operation)AppOrder(address app,uint256 appprice,uint256 volume,bytes32 tag,address datasetrestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant DATASETORDEROPERATION_TYPEHASH = keccak256('DatasetOrderOperation(DatasetOrder order,uint256 operation)DatasetOrder(address dataset,uint256 datasetprice,uint256 volume,bytes32 tag,address apprestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant WORKERPOOLORDEROPERATION_TYPEHASH = keccak256('WorkerpoolOrderOperation(WorkerpoolOrder order,uint256 operation)WorkerpoolOrder(address workerpool,uint256 workerpoolprice,uint256 volume,bytes32 tag,uint256 category,uint256 trust,address apprestrict,address datasetrestrict,address requesterrestrict,bytes32 salt)');
// bytes32 public constant REQUESTORDEROPERATION_TYPEHASH = keccak256('RequestOrderOperation(RequestOrder order,uint256 operation)RequestOrder(address app,uint256 appmaxprice,address dataset,uint256 datasetmaxprice,address workerpool,uint256 workerpoolmaxprice,address requester,uint256 volume,bytes32 tag,uint256 category,uint256 trust,address beneficiary,address callback,string params,bytes32 salt)');
// bytes32 public constant REQUESTORDEROPERATION_TYPEHASH = keccak256('RequestOrderOperation(RequestOrder order,uint256 operation)RequestOrder(address app,uint256 appmaxprice,address dataset,uint256 datasetmaxprice,address workerpool,uint256 workerpoolmaxprice,address requester,uint256 volume,bytes32 tag,uint256 category,uint256 trust,address beneficiary,address callback,string params,bytes32 salt)');
bytes32 public constant EIP712DOMAIN_TYPEHASH =
0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;
bytes32 public constant APPORDER_TYPEHASH =
Expand Down
2 changes: 1 addition & 1 deletion contracts/modules/FacetBase.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.6.0;
Expand Down
2 changes: 1 addition & 1 deletion contracts/modules/FacetBase.v8.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-FileCopyrightText: 2023-2025 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.0;
Expand Down
Loading