Skip to content

Commit 5544abf

Browse files
authored
Format all solidity files (#233)
2 parents b6a5a16 + 8988fd0 commit 5544abf

File tree

67 files changed

+591
-1248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+591
-1248
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## vNEXT
44

55
- Migrate proxy to Diamond pattern (ERC-2535):
6+
- Format all solidity files (#233)
67
- Rename ERC1538 architure to diamond Proxy architecture(#226, #229, #230)
78
- Remove ENS module (#225)
89
- Add Diamond contract unit tests (#224)

contracts/IexecInterfaceNative.sol

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1+
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
12
// SPDX-License-Identifier: Apache-2.0
23

3-
/******************************************************************************
4-
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
5-
* *
6-
* Licensed under the Apache License, Version 2.0 (the "License"); *
7-
* you may not use this file except in compliance with the License. *
8-
* You may obtain a copy of the License at *
9-
* *
10-
* http://www.apache.org/licenses/LICENSE-2.0 *
11-
* *
12-
* Unless required by applicable law or agreed to in writing, software *
13-
* distributed under the License is distributed on an "AS IS" BASIS, *
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15-
* See the License for the specific language governing permissions and *
16-
* limitations under the License. *
17-
******************************************************************************/
18-
194
pragma solidity ^0.6.0;
205
pragma experimental ABIEncoderV2;
216

contracts/IexecInterfaceNativeABILegacy.sol

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1+
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
12
// SPDX-License-Identifier: Apache-2.0
23

3-
/******************************************************************************
4-
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
5-
* *
6-
* Licensed under the Apache License, Version 2.0 (the "License"); *
7-
* you may not use this file except in compliance with the License. *
8-
* You may obtain a copy of the License at *
9-
* *
10-
* http://www.apache.org/licenses/LICENSE-2.0 *
11-
* *
12-
* Unless required by applicable law or agreed to in writing, software *
13-
* distributed under the License is distributed on an "AS IS" BASIS, *
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15-
* See the License for the specific language governing permissions and *
16-
* limitations under the License. *
17-
******************************************************************************/
18-
194
pragma solidity ^0.6.0;
205
pragma experimental ABIEncoderV2;
216

contracts/IexecInterfaceToken.sol

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1+
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
12
// SPDX-License-Identifier: Apache-2.0
23

3-
/******************************************************************************
4-
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
5-
* *
6-
* Licensed under the Apache License, Version 2.0 (the "License"); *
7-
* you may not use this file except in compliance with the License. *
8-
* You may obtain a copy of the License at *
9-
* *
10-
* http://www.apache.org/licenses/LICENSE-2.0 *
11-
* *
12-
* Unless required by applicable law or agreed to in writing, software *
13-
* distributed under the License is distributed on an "AS IS" BASIS, *
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15-
* See the License for the specific language governing permissions and *
16-
* limitations under the License. *
17-
******************************************************************************/
18-
194
pragma solidity ^0.6.0;
205
pragma experimental ABIEncoderV2;
216

contracts/IexecInterfaceTokenABILegacy.sol

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1+
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
12
// SPDX-License-Identifier: Apache-2.0
23

3-
/******************************************************************************
4-
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
5-
* *
6-
* Licensed under the Apache License, Version 2.0 (the "License"); *
7-
* you may not use this file except in compliance with the License. *
8-
* You may obtain a copy of the License at *
9-
* *
10-
* http://www.apache.org/licenses/LICENSE-2.0 *
11-
* *
12-
* Unless required by applicable law or agreed to in writing, software *
13-
* distributed under the License is distributed on an "AS IS" BASIS, *
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15-
* See the License for the specific language governing permissions and *
16-
* limitations under the License. *
17-
******************************************************************************/
18-
194
pragma solidity ^0.6.0;
205
pragma experimental ABIEncoderV2;
216

contracts/Store.sol

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH <[email protected]>
1+
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
22
// SPDX-License-Identifier: Apache-2.0
33

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

2626
// TODO replace with diamond AppStorage using namespaced storage.
2727
// TODO check storage padding.
28-
abstract contract Store
29-
{
30-
// Registries
31-
IRegistry internal m_appregistry;
32-
IRegistry internal m_datasetregistry;
33-
IRegistry internal m_workerpoolregistry;
28+
abstract contract Store {
29+
// Registries
30+
IRegistry internal m_appregistry;
31+
IRegistry internal m_datasetregistry;
32+
IRegistry internal m_workerpoolregistry;
3433

35-
// Escrow
36-
IERC20 internal m_baseToken;
37-
string internal m_name;
38-
string internal m_symbol;
39-
uint8 internal m_decimals;
40-
uint256 internal m_totalSupply;
41-
mapping (address => uint256 ) internal m_balances;
42-
mapping (address => uint256 ) internal m_frozens;
43-
mapping (address => mapping (address => uint256)) internal m_allowances;
34+
// Escrow
35+
IERC20 internal m_baseToken;
36+
string internal m_name;
37+
string internal m_symbol;
38+
uint8 internal m_decimals;
39+
uint256 internal m_totalSupply;
40+
mapping(address => uint256) internal m_balances;
41+
mapping(address => uint256) internal m_frozens;
42+
mapping(address => mapping(address => uint256)) internal m_allowances;
4443

45-
// Poco - Constants
46-
uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7;
47-
uint256 internal constant REVEAL_DEADLINE_RATIO = 2;
48-
uint256 internal constant FINAL_DEADLINE_RATIO = 10;
49-
uint256 internal constant WORKERPOOL_STAKE_RATIO = 30;
50-
uint256 internal constant KITTY_RATIO = 10;
51-
uint256 internal constant KITTY_MIN = 1000000000; // ADJUSTEMENT VARIABLE
52-
address internal constant KITTY_ADDRESS = 0x99c2268479b93fDe36232351229815DF80837e23; // address(uint256(keccak256(bytes('iExecKitty'))) - 1);
53-
uint256 internal constant GROUPMEMBER_PURPOSE = 4;
54-
bytes32 internal EIP712DOMAIN_SEPARATOR;
44+
// Poco - Constants
45+
uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7;
46+
uint256 internal constant REVEAL_DEADLINE_RATIO = 2;
47+
uint256 internal constant FINAL_DEADLINE_RATIO = 10;
48+
uint256 internal constant WORKERPOOL_STAKE_RATIO = 30;
49+
uint256 internal constant KITTY_RATIO = 10;
50+
uint256 internal constant KITTY_MIN = 1000000000; // ADJUSTEMENT VARIABLE
51+
address internal constant KITTY_ADDRESS = 0x99c2268479b93fDe36232351229815DF80837e23; // address(uint256(keccak256(bytes('iExecKitty'))) - 1);
52+
uint256 internal constant GROUPMEMBER_PURPOSE = 4;
53+
bytes32 internal EIP712DOMAIN_SEPARATOR;
5554

56-
// Poco - Storage
57-
mapping(bytes32 => address ) internal m_presigned; // per order
58-
mapping(bytes32 => uint256 ) internal m_consumed; // per order
59-
mapping(bytes32 => IexecLibCore_v5.Deal ) internal m_deals; // per deal
60-
mapping(bytes32 => IexecLibCore_v5.Task ) internal m_tasks; // per task
61-
mapping(bytes32 => IexecLibCore_v5.Consensus ) internal m_consensus; // per task
62-
mapping(bytes32 => mapping(address => IexecLibCore_v5.Contribution)) internal m_contributions; // per task-worker
63-
mapping(address => uint256 ) internal m_workerScores; // per worker
55+
// Poco - Storage
56+
mapping(bytes32 => address) internal m_presigned; // per order
57+
mapping(bytes32 => uint256) internal m_consumed; // per order
58+
mapping(bytes32 => IexecLibCore_v5.Deal) internal m_deals; // per deal
59+
mapping(bytes32 => IexecLibCore_v5.Task) internal m_tasks; // per task
60+
mapping(bytes32 => IexecLibCore_v5.Consensus) internal m_consensus; // per task
61+
mapping(bytes32 => mapping(address => IexecLibCore_v5.Contribution)) internal m_contributions; // per task-worker
62+
mapping(address => uint256) internal m_workerScores; // per worker
6463

65-
// Poco - Settings
66-
address internal m_teebroker;
67-
uint256 internal m_callbackgas;
64+
// Poco - Settings
65+
address internal m_teebroker;
66+
uint256 internal m_callbackgas;
6867

69-
// Categories
70-
IexecLibCore_v5.Category[] internal m_categories;
68+
// Categories
69+
IexecLibCore_v5.Category[] internal m_categories;
7170

72-
// Backward compatibility
73-
IexecHubInterface internal m_v3_iexecHub;
74-
mapping(address => bool) internal m_v3_scoreImported;
71+
// Backward compatibility
72+
IexecHubInterface internal m_v3_iexecHub;
73+
mapping(address => bool) internal m_v3_scoreImported;
7574
}

contracts/Store.v8.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH <[email protected]>
1+
// SPDX-FileCopyrightText: 2023-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
22
// SPDX-License-Identifier: Apache-2.0
33

44
pragma solidity ^0.8.0;

contracts/external/interfaces/IERC734.sol

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1+
// SPDX-FileCopyrightText: 2023-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
12
// SPDX-License-Identifier: Apache-2.0
23

3-
/******************************************************************************
4-
* Copyright 2023 IEXEC BLOCKCHAIN TECH *
5-
* *
6-
* Licensed under the Apache License, Version 2.0 (the "License"); *
7-
* you may not use this file except in compliance with the License. *
8-
* You may obtain a copy of the License at *
9-
* *
10-
* http://www.apache.org/licenses/LICENSE-2.0 *
11-
* *
12-
* Unless required by applicable law or agreed to in writing, software *
13-
* distributed under the License is distributed on an "AS IS" BASIS, *
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15-
* See the License for the specific language governing permissions and *
16-
* limitations under the License. *
17-
******************************************************************************/
18-
194
pragma solidity ^0.8.0;
205

216
/**

contracts/libs/IexecLibOrders_v5.sol

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
1+
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
12
// SPDX-License-Identifier: Apache-2.0
23

3-
/******************************************************************************
4-
* Copyright 2020 IEXEC BLOCKCHAIN TECH *
5-
* *
6-
* Licensed under the Apache License, Version 2.0 (the "License"); *
7-
* you may not use this file except in compliance with the License. *
8-
* You may obtain a copy of the License at *
9-
* *
10-
* http://www.apache.org/licenses/LICENSE-2.0 *
11-
* *
12-
* Unless required by applicable law or agreed to in writing, software *
13-
* distributed under the License is distributed on an "AS IS" BASIS, *
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15-
* See the License for the specific language governing permissions and *
16-
* limitations under the License. *
17-
******************************************************************************/
18-
194
pragma solidity >=0.6.0;
205
pragma experimental ABIEncoderV2;
216

227
library IexecLibOrders_v5 {
23-
// bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');
24-
// bytes32 public constant APPORDER_TYPEHASH = keccak256('AppOrder(address app,uint256 appprice,uint256 volume,bytes32 tag,address datasetrestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
25-
// bytes32 public constant DATASETORDER_TYPEHASH = keccak256('DatasetOrder(address dataset,uint256 datasetprice,uint256 volume,bytes32 tag,address apprestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
26-
// 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)');
27-
// 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)');
28-
// 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)');
29-
// 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)');
8+
// bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');
9+
// bytes32 public constant APPORDER_TYPEHASH = keccak256('AppOrder(address app,uint256 appprice,uint256 volume,bytes32 tag,address datasetrestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
10+
// bytes32 public constant DATASETORDER_TYPEHASH = keccak256('DatasetOrder(address dataset,uint256 datasetprice,uint256 volume,bytes32 tag,address apprestrict,address workerpoolrestrict,address requesterrestrict,bytes32 salt)');
11+
// 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)');
12+
// 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)');
13+
// 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)');
14+
// 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)');
3015
// 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)');
31-
// 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)');
16+
// 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)');
3217
bytes32 public constant EIP712DOMAIN_TYPEHASH =
3318
0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;
3419
bytes32 public constant APPORDER_TYPEHASH =

contracts/modules/FacetBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH <[email protected]>
1+
// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH <[email protected]>
22
// SPDX-License-Identifier: Apache-2.0
33

44
pragma solidity ^0.6.0;

0 commit comments

Comments
 (0)