From a550e7573b6f2f1a347bfec843ca0816cba60768 Mon Sep 17 00:00:00 2001
From: Zied <26070035+zguesmi@users.noreply.github.com>
Date: Wed, 2 Sep 2026 11:57:42 +0200
Subject: [PATCH 1/9] refactor!: drop the Token suffix from the escrow and
aggregate names
The protocol has run in a single, token-based mode for a long time. The
`Token` suffix no longer distinguishes anything, so it is dropped in favour
of the naming convention the library conversion established: `Iexec*` for
interfaces, `*Base` for abstracts, `*Facet` for facets, `*Lib` for libraries.
contracts/IexecInterfaceToken.sol -> contracts/IexecInterface.sol
contracts/interfaces/IexecEscrowToken.sol -> contracts/interfaces/IexecEscrow.sol
contracts/facets/IexecEscrowTokenFacet.sol -> contracts/facets/IexecEscrowFacet.sol
The two escrow test files follow the same rename so the suite keeps matching
the contracts it exercises.
This is a breaking change for downstream consumers. `IexecInterfaceToken` is
referenced by path in the SDK and in `iexec-commons-poco`, and the published
ABI moves from `abis/contracts/IexecInterfaceToken.json` to
`abis/contracts/IexecInterface.json`. The contents of that file are byte for
byte identical to the old one; only the name and the path change. The two
hand-maintained facet lists named in the architecture notes,
`utils/proxy-tools.ts#getAllLocalFacetFunctions` and the facet groups in
`scripts/tools/sol-to-uml.mjs`, are updated alongside.
`IexecLibCore_v5` and `IexecLibOrders_v5` are deliberately left alone. Their
names leak into `config/config.json`, the link key in `deploy/0_deploy.ts`, a
hard requirement in `utils/proxy-tools.ts` and the `internalType` fields of
every ABI, so they deserve a separate change. Their rename markers stay in
place.
A note is added to the aggregate interface explaining why `IexecPocoBoost` and
`IexecPocoBoostAccessors` are still absent from it: the Boost facets are not
deployed on Arbitrum mainnet or Arbitrum Sepolia, so aggregating them would
make the SDK advertise functions that revert.
---
...ecInterfaceToken.json => IexecInterface.json} | 0
...crowTokenFacet.json => IexecEscrowFacet.json} | 0
.../{IexecEscrowToken.json => IexecEscrow.json} | 0
.../IexecInterface.json} | 0
.../IexecEscrowFacet.json} | 0
.../IexecEscrow.json} | 0
contracts/Diamond.sol | 4 ++--
...execInterfaceToken.sol => IexecInterface.sol} | 14 ++++++++------
...EscrowTokenFacet.sol => IexecEscrowFacet.sol} | 5 ++---
contracts/facets/IexecPoco1Facet.sol | 2 +-
.../{IexecEscrowToken.sol => IexecEscrow.sol} | 2 +-
contracts/interfaces/IexecPocoBoost.sol | 2 +-
contracts/interfaces/IexecPocoBoostAccessors.sol | 2 +-
contracts/libs/StakedRlcLib.sol | 2 +-
deploy/0_deploy.ts | 4 ++--
docs/solidity/index.md | 10 +++++-----
docs/uml/class-uml-IexecEscrows.svg | 16 ++++++++--------
docs/uml/class-uml-dir-facets.svg | 4 ++--
scripts/set-callback-gas.ts | 4 ++--
scripts/tools/sol-to-uml.mjs | 2 +-
scripts/upgrades/v6.2.0.ts | 14 +++++++-------
test/000_fullchain-boost.test.ts | 8 ++++----
test/000_fullchain.test.ts | 6 +++---
test/200_fullchain-bot.test.ts | 6 +++---
test/201_fullchain-multi-orders.test.ts | 6 +++---
test/300_fullchain-reopen.test.ts | 6 +++---
.../IexecAccessorsABILegacy.test.ts | 6 +++---
.../IexecCategoryManager.test.ts | 6 +++---
.../IexecConfiguration.test.ts | 8 ++++----
test/byContract/IexecERC20/IexecERC20.test.ts | 8 ++++----
...st.ts => IexecEscrow-receiveApproval.test.ts} | 12 ++++++------
...ecEscrowToken.test.ts => IexecEscrow.test.ts} | 13 ++++---------
.../IexecOrderManagement.test.ts | 10 +++-------
test/byContract/IexecPoco/IexecPoco1.test.ts | 10 +++++-----
.../IexecPoco/IexecPoco2-claim.test.ts | 8 ++++----
.../IexecPoco2-contribute-and-finalize.test.ts | 10 +++-------
.../IexecPoco/IexecPoco2-contribute.test.ts | 6 +++---
.../IexecPoco/IexecPoco2-finalize.test.ts | 8 ++++----
.../IexecPoco/IexecPoco2-initialize.test.ts | 8 ++++----
.../IexecPoco/IexecPoco2-reopen.test.ts | 6 +++---
.../IexecPoco/IexecPoco2-reveal.test.ts | 6 +++---
.../IexecPocoBoost/IexecPocoBoost.test.ts | 8 ++++----
test/byContract/IexecRelay/IexecRelay.test.ts | 10 +++-------
.../IexecPocoAccessors.test.ts | 10 +++-------
test/byContract/registries/assets.test.ts | 8 ++++----
test/byContract/registries/registries.test.ts | 8 ++++----
test/utils/IexecWrapper.ts | 8 ++++----
test/utils/fixture-helpers.ts | 6 +++---
utils/proxy-tools.ts | 4 ++--
49 files changed, 143 insertions(+), 163 deletions(-)
rename abis/contracts/{IexecInterfaceToken.json => IexecInterface.json} (100%)
rename abis/contracts/facets/{IexecEscrowTokenFacet.json => IexecEscrowFacet.json} (100%)
rename abis/contracts/interfaces/{IexecEscrowToken.json => IexecEscrow.json} (100%)
rename abis/human-readable-abis/contracts/{IexecInterfaceToken.sol/IexecInterfaceToken.json => IexecInterface.sol/IexecInterface.json} (100%)
rename abis/human-readable-abis/contracts/facets/{IexecEscrowTokenFacet.sol/IexecEscrowTokenFacet.json => IexecEscrowFacet.sol/IexecEscrowFacet.json} (100%)
rename abis/human-readable-abis/contracts/interfaces/{IexecEscrowToken.sol/IexecEscrowToken.json => IexecEscrow.sol/IexecEscrow.json} (100%)
rename contracts/{IexecInterfaceToken.sol => IexecInterface.sol} (78%)
rename contracts/facets/{IexecEscrowTokenFacet.sol => IexecEscrowFacet.sol} (98%)
rename contracts/interfaces/{IexecEscrowToken.sol => IexecEscrow.sol} (97%)
rename test/byContract/IexecEscrow/{IexecEscrowToken-receiveApproval.test.ts => IexecEscrow-receiveApproval.test.ts} (98%)
rename test/byContract/IexecEscrow/{IexecEscrowToken.test.ts => IexecEscrow.test.ts} (98%)
diff --git a/abis/contracts/IexecInterfaceToken.json b/abis/contracts/IexecInterface.json
similarity index 100%
rename from abis/contracts/IexecInterfaceToken.json
rename to abis/contracts/IexecInterface.json
diff --git a/abis/contracts/facets/IexecEscrowTokenFacet.json b/abis/contracts/facets/IexecEscrowFacet.json
similarity index 100%
rename from abis/contracts/facets/IexecEscrowTokenFacet.json
rename to abis/contracts/facets/IexecEscrowFacet.json
diff --git a/abis/contracts/interfaces/IexecEscrowToken.json b/abis/contracts/interfaces/IexecEscrow.json
similarity index 100%
rename from abis/contracts/interfaces/IexecEscrowToken.json
rename to abis/contracts/interfaces/IexecEscrow.json
diff --git a/abis/human-readable-abis/contracts/IexecInterfaceToken.sol/IexecInterfaceToken.json b/abis/human-readable-abis/contracts/IexecInterface.sol/IexecInterface.json
similarity index 100%
rename from abis/human-readable-abis/contracts/IexecInterfaceToken.sol/IexecInterfaceToken.json
rename to abis/human-readable-abis/contracts/IexecInterface.sol/IexecInterface.json
diff --git a/abis/human-readable-abis/contracts/facets/IexecEscrowTokenFacet.sol/IexecEscrowTokenFacet.json b/abis/human-readable-abis/contracts/facets/IexecEscrowFacet.sol/IexecEscrowFacet.json
similarity index 100%
rename from abis/human-readable-abis/contracts/facets/IexecEscrowTokenFacet.sol/IexecEscrowTokenFacet.json
rename to abis/human-readable-abis/contracts/facets/IexecEscrowFacet.sol/IexecEscrowFacet.json
diff --git a/abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json b/abis/human-readable-abis/contracts/interfaces/IexecEscrow.sol/IexecEscrow.json
similarity index 100%
rename from abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json
rename to abis/human-readable-abis/contracts/interfaces/IexecEscrow.sol/IexecEscrow.json
diff --git a/contracts/Diamond.sol b/contracts/Diamond.sol
index 909e46a9a..1486f7f47 100644
--- a/contracts/Diamond.sol
+++ b/contracts/Diamond.sol
@@ -42,7 +42,7 @@ contract Diamond {
/**
* `fallback` function must be added to the diamond with selector `0xffffffff`.
- * The function is defined in the IexecEscrowToken facet.
+ * The function is defined in the IexecEscrow facet.
*/
fallback() external payable {
_fallback();
@@ -50,7 +50,7 @@ contract Diamond {
/**
* `receive` function must be added to the diamond with selector `0x00000000`.
- * The function is defined in the IexecEscrowToken facet.
+ * The function is defined in the IexecEscrow facet.
*/
receive() external payable {
_fallback();
diff --git a/contracts/IexecInterfaceToken.sol b/contracts/IexecInterface.sol
similarity index 78%
rename from contracts/IexecInterfaceToken.sol
rename to contracts/IexecInterface.sol
index 5d0a70ce5..efd228dba 100644
--- a/contracts/IexecInterfaceToken.sol
+++ b/contracts/IexecInterface.sol
@@ -7,8 +7,8 @@ import {IexecAccessorsABILegacy} from "./interfaces/IexecAccessorsABILegacy.sol"
import {IexecCategoryManager} from "./interfaces/IexecCategoryManager.sol";
import {IexecConfiguration} from "./interfaces/IexecConfiguration.sol";
import {IexecConfigurationExtra} from "./interfaces/IexecConfigurationExtra.sol";
+import {IexecEscrow} from "./interfaces/IexecEscrow.sol";
import {IexecEscrowEvents} from "./interfaces/IexecEscrowEvents.sol";
-import {IexecEscrowToken} from "./interfaces/IexecEscrowToken.sol";
import {IexecOrderManagement} from "./interfaces/IexecOrderManagement.sol";
import {IexecPoco1} from "./interfaces/IexecPoco1.sol";
import {IexecPoco1Errors} from "./interfaces/IexecPoco1Errors.sol";
@@ -20,23 +20,25 @@ import {IOwnable} from "./interfaces/IOwnable.sol";
// TODO see if Diamond interfaces should be added here ??
// IDiamond, IDiamondLoupe, IDiamondCut, IERC165, IERC173 (ownership)
-// TODO rename to IexecInterface
/**
* A global interface that aggregates all the interfaces needed to interact with
- * the PoCo contracts in token mode.
- * @dev Referenced in the SDK with the current path `contracts/IexecInterfaceToken.sol`.
+ * the PoCo contracts.
+ * @dev Referenced in the SDK with the path `contracts/IexecInterface.sol`.
* Changing the name or the path would cause a breaking change in the SDK.
*/
// TODO Remove the interface `IexecAccessorsABILegacy` when it's not used in the middleware anymore.
// https://github.com/iExecBlockchainComputing/iexec-commons-poco/blob/819cd008/generateContractWrappers#L7
-interface IexecInterfaceToken is
+// TODO Add the interfaces `IexecPocoBoost` and `IexecPocoBoostAccessors` once the Boost facets
+// are deployed on every network. They are not deployed on Arbitrum mainnet nor on Arbitrum
+// Sepolia today, so aggregating them here would make the SDK advertise functions that revert.
+interface IexecInterface is
IexecAccessorsABILegacy,
IexecCategoryManager,
IexecConfiguration,
IexecConfigurationExtra,
+ IexecEscrow,
IexecEscrowEvents,
- IexecEscrowToken,
IexecOrderManagement,
IexecPoco1,
IexecPoco1Errors,
diff --git a/contracts/facets/IexecEscrowTokenFacet.sol b/contracts/facets/IexecEscrowFacet.sol
similarity index 98%
rename from contracts/facets/IexecEscrowTokenFacet.sol
rename to contracts/facets/IexecEscrowFacet.sol
index 2944e8dea..a5eaf3f7c 100644
--- a/contracts/facets/IexecEscrowTokenFacet.sol
+++ b/contracts/facets/IexecEscrowFacet.sol
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
import {FacetBase} from "../abstract/FacetBase.sol";
import {StakedRlcLib} from "../libs/StakedRlcLib.sol";
-import {IexecEscrowToken} from "../interfaces/IexecEscrowToken.sol";
+import {IexecEscrow} from "../interfaces/IexecEscrow.sol";
import {IexecTokenSpender} from "../interfaces/IexecTokenSpender.sol";
import {IexecPoco1} from "../interfaces/IexecPoco1.sol";
import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol";
@@ -23,8 +23,7 @@ import {PocoStorageLib} from "../libs/PocoStorageLib.sol";
* RLC, and the ERC-20 methods move it between accounts. The balance moves of the
* escrow itself (lock, unlock, reward, seize) run over the same ledger.
*/
-// TODO rename to IexecEscrowFacet
-contract IexecEscrowTokenFacet is IexecEscrowToken, IexecTokenSpender, FacetBase {
+contract IexecEscrowFacet is IexecEscrow, IexecTokenSpender, FacetBase {
/***************************************************************************
* Deposit and withdraw functions *
***************************************************************************/
diff --git a/contracts/facets/IexecPoco1Facet.sol b/contracts/facets/IexecPoco1Facet.sol
index 03e4d9566..87917a36e 100644
--- a/contracts/facets/IexecPoco1Facet.sol
+++ b/contracts/facets/IexecPoco1Facet.sol
@@ -154,7 +154,7 @@ contract IexecPoco1Facet is IexecPoco1, IexecPoco1Errors, FacetBase {
* @notice This function does not use `msg.sender` to determine who pays for the deal.
* The sponsor is always set to `_requestorder.requester`, regardless of who calls this function.
* This design allows the function to be safely called via delegatecall from other facets
- * (e.g., IexecEscrowTokenFacet.receiveApproval) without security concerns.
+ * (e.g., IexecEscrowFacet.receiveApproval) without security concerns.
*
* @param _apporder The app order.
* @param _datasetorder The dataset order.
diff --git a/contracts/interfaces/IexecEscrowToken.sol b/contracts/interfaces/IexecEscrow.sol
similarity index 97%
rename from contracts/interfaces/IexecEscrowToken.sol
rename to contracts/interfaces/IexecEscrow.sol
index a25b49ed8..2a8d958dc 100644
--- a/contracts/interfaces/IexecEscrowToken.sol
+++ b/contracts/interfaces/IexecEscrow.sol
@@ -3,7 +3,7 @@
pragma solidity ^0.8.0;
-interface IexecEscrowToken {
+interface IexecEscrow {
error UnsupportedOperation(bytes4 selector);
error OperationFailed();
error CallerIsNotTheRequester();
diff --git a/contracts/interfaces/IexecPocoBoost.sol b/contracts/interfaces/IexecPocoBoost.sol
index cf4367ad5..c66b7f887 100644
--- a/contracts/interfaces/IexecPocoBoost.sol
+++ b/contracts/interfaces/IexecPocoBoost.sol
@@ -8,7 +8,7 @@ import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol";
/**
* @title Interface definition of the PoCo Boost facet.
*/
-// TODO add this to IexecInterfaceToken when the facet is deployed.
+// TODO add this to IexecInterface when the facet is deployed.
interface IexecPocoBoost {
/**
* @notice Emitted when a set of compatible orders are matched and a new deal is created.
diff --git a/contracts/interfaces/IexecPocoBoostAccessors.sol b/contracts/interfaces/IexecPocoBoostAccessors.sol
index d25cbd3db..9cf19ca4d 100644
--- a/contracts/interfaces/IexecPocoBoostAccessors.sol
+++ b/contracts/interfaces/IexecPocoBoostAccessors.sol
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
import {IexecLibCore_v5} from "../libs/IexecLibCore_v5.sol";
-// TODO add this to IexecInterfaceToken when the facet is deployed.
+// TODO add this to IexecInterface when the facet is deployed.
interface IexecPocoBoostAccessors {
function viewDealBoost(bytes32 id) external view returns (IexecLibCore_v5.DealBoost memory);
}
diff --git a/contracts/libs/StakedRlcLib.sol b/contracts/libs/StakedRlcLib.sol
index fcbe1e41a..7ef7a0ff2 100644
--- a/contracts/libs/StakedRlcLib.sol
+++ b/contracts/libs/StakedRlcLib.sol
@@ -22,7 +22,7 @@ library StakedRlcLib {
* @notice
* This is the single implementation of an sRLC balance move. It backs both
* the escrow operations of {EscrowLib} and the ERC-20 entry points of
- * {IexecEscrowTokenFacet}.
+ * {IexecEscrowFacet}.
* A self-transfer is a no-op on the balances and is not rejected.
*
* @param from The address of the spender account.
diff --git a/deploy/0_deploy.ts b/deploy/0_deploy.ts
index 011eb48d2..60c20c0e6 100644
--- a/deploy/0_deploy.ts
+++ b/deploy/0_deploy.ts
@@ -19,7 +19,7 @@ import {
IexecCategoryManager__factory,
IexecConfigurationExtraFacet__factory,
IexecConfigurationFacet__factory,
- IexecEscrowTokenFacet__factory,
+ IexecEscrowFacet__factory,
IexecLibOrders_v5__factory,
IexecOrderManagementFacet__factory,
IexecPoco1Facet__factory,
@@ -99,7 +99,7 @@ export default async function deploy() {
new IexecCategoryManagerFacet__factory(),
new IexecConfigurationExtraFacet__factory(),
new IexecConfigurationFacet__factory(iexecLibOrders),
- new IexecEscrowTokenFacet__factory(),
+ new IexecEscrowFacet__factory(),
new IexecOrderManagementFacet__factory(iexecLibOrders),
new IexecPoco1Facet__factory(iexecLibOrders),
new IexecPoco2Facet__factory(),
diff --git a/docs/solidity/index.md b/docs/solidity/index.md
index 7cbd1227b..65d4c4f4b 100644
--- a/docs/solidity/index.md
+++ b/docs/solidity/index.md
@@ -1,11 +1,11 @@
# Solidity API
-## IexecInterfaceToken
+## IexecInterface
A global interface that aggregates all the interfaces needed to interact with
-the PoCo contracts in token mode.
+the PoCo contracts.
-_Referenced in the SDK with the current path `contracts/IexecInterfaceToken.sol`.
+_Referenced in the SDK with the path `contracts/IexecInterface.sol`.
Changing the name or the path would cause a breaking change in the SDK._
## FacetBase
@@ -68,7 +68,7 @@ function setTeeBroker(address _teebroker) external
function setCallbackGas(uint256 _callbackgas) external
```
-## IexecEscrowTokenFacet
+## IexecEscrowFacet
Deposits of the base RLC token are held by the proxy and credited 1:1
as sRLC (ERC20 "Staked RLC"), managed by this facet manages. sRLC is not a
@@ -304,7 +304,7 @@ Match orders. The requester gets debited.
This function does not use `msg.sender` to determine who pays for the deal.
The sponsor is always set to `_requestorder.requester`, regardless of who calls this function.
This design allows the function to be safely called via delegatecall from other facets
-(e.g., IexecEscrowTokenFacet.receiveApproval) without security concerns.
+(e.g., IexecEscrowFacet.receiveApproval) without security concerns.
#### Parameters
diff --git a/docs/uml/class-uml-IexecEscrows.svg b/docs/uml/class-uml-IexecEscrows.svg
index 25eb235b6..b4a3e3a10 100644
--- a/docs/uml/class-uml-IexecEscrows.svg
+++ b/docs/uml/class-uml-IexecEscrows.svg
@@ -37,8 +37,8 @@
8
-IexecEscrowTokenFacet
-contracts/facets/IexecEscrowTokenFacet.sol
+IexecEscrowFacet
+contracts/facets/IexecEscrowFacet.sol
Internal:
_executeOperation(sender: address, data: bytes)
@@ -68,13 +68,13 @@
-
+
-23
+22
<<Interface>>
-IexecEscrowToken
-contracts/interfaces/IexecEscrowToken.sol
+IexecEscrow
+contracts/interfaces/IexecEscrow.sol
External:
null()
@@ -92,9 +92,9 @@
decreaseAllowance(address, uint256): bool
approveAndCall(address, uint256, bytes): bool
-
+
-8->23
+8->22
diff --git a/docs/uml/class-uml-dir-facets.svg b/docs/uml/class-uml-dir-facets.svg
index 7518ea546..83390cadb 100644
--- a/docs/uml/class-uml-dir-facets.svg
+++ b/docs/uml/class-uml-dir-facets.svg
@@ -67,8 +67,8 @@
4
-IexecEscrowTokenFacet
-contracts/facets/IexecEscrowTokenFacet.sol
+IexecEscrowFacet
+contracts/facets/IexecEscrowFacet.sol
Internal:
_executeOperation(sender: address, data: bytes)
diff --git a/scripts/set-callback-gas.ts b/scripts/set-callback-gas.ts
index e545c4d25..30395c4cb 100644
--- a/scripts/set-callback-gas.ts
+++ b/scripts/set-callback-gas.ts
@@ -4,7 +4,7 @@
// Usage: CALLBACK_GAS= npx hardhat run scripts/set-callback-gas.ts --network
import { ethers } from 'hardhat';
-import { IexecInterfaceToken__factory } from '../typechain';
+import { IexecInterface__factory } from '../typechain';
import config from '../utils/config';
import { getDeployerAndOwnerSigners } from '../utils/deploy-tools';
@@ -21,7 +21,7 @@ import { getDeployerAndOwnerSigners } from '../utils/deploy-tools';
}
console.log(`Diamond proxy address: ${proxyAddress}`);
const { owner } = await getDeployerAndOwnerSigners();
- const iexecPoCo = IexecInterfaceToken__factory.connect(proxyAddress, owner);
+ const iexecPoCo = IexecInterface__factory.connect(proxyAddress, owner);
if ((await iexecPoCo.owner()) !== owner.address) {
throw new Error(`Sender account ${owner.address} is not the PoCo owner.`);
}
diff --git a/scripts/tools/sol-to-uml.mjs b/scripts/tools/sol-to-uml.mjs
index 0b7820954..aa49b8bc5 100644
--- a/scripts/tools/sol-to-uml.mjs
+++ b/scripts/tools/sol-to-uml.mjs
@@ -13,7 +13,7 @@ await generateClassDiagramOfDirectory('registries');
await generateClassDiagramOfContracts(['IexecPoco1Facet', 'IexecPoco2Facet'], 'IexecPocoFacets');
-await generateClassDiagramOfContracts(['IexecEscrowTokenFacet', 'EscrowLib'], 'IexecEscrows');
+await generateClassDiagramOfContracts(['IexecEscrowFacet', 'EscrowLib'], 'IexecEscrows');
await generateClassDiagramOfContracts(['IexecPocoBoostFacet'], 'IexecPocoBoostFacet');
diff --git a/scripts/upgrades/v6.2.0.ts b/scripts/upgrades/v6.2.0.ts
index 3b5b2aec1..06a0d631b 100644
--- a/scripts/upgrades/v6.2.0.ts
+++ b/scripts/upgrades/v6.2.0.ts
@@ -6,7 +6,7 @@ import {
IexecCategoryManagerFacet__factory,
IexecConfigurationExtraFacet__factory,
IexecConfigurationFacet__factory,
- IexecEscrowTokenFacet__factory,
+ IexecEscrowFacet__factory,
IexecOrderManagementFacet__factory,
IexecPoco1Facet__factory,
IexecPoco2Facet__factory,
@@ -39,7 +39,7 @@ async function main() {
IexecConfigurationExtraFacet: '0x7Ff117E7385Ac3E207AF1791fE7e66C7802aeCCd',
IexecConfigurationFacet: '0x88eb05e62434057d3AA9e41FdaF7300A586b314D',
IexecERC20Facet: '0xB0152eC6f48E64a92B66D4736aFA1b02d8D45169', // Removed from codebase
- IexecEscrowTokenFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
+ IexecEscrowFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
IexecOrderManagementFacet: '0x541d532E6C195Ba044a75325F367342f523627fB',
IexecPoco1Facet: '0xC8dE3913fcdBC576970dCe24eE416CA25681f65f',
IexecPoco2Facet: '0x5c7B589E6807B554ed278f335215B93bCB692162',
@@ -53,7 +53,7 @@ async function main() {
IexecConfigurationExtraFacet: '0x7Ff117E7385Ac3E207AF1791fE7e66C7802aeCCd',
IexecConfigurationFacet: '0x88eb05e62434057d3AA9e41FdaF7300A586b314D',
IexecERC20Facet: '0xB0152eC6f48E64a92B66D4736aFA1b02d8D45169', // Removed from codebase
- IexecEscrowTokenFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
+ IexecEscrowFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
IexecOrderManagementFacet: '0x541d532E6C195Ba044a75325F367342f523627fB',
IexecPoco1Facet: '0x5331c0FC7DD0Cc08047B546675cd1d6d47152AEb',
IexecPoco2Facet: '0x5c7B589E6807B554ed278f335215B93bCB692162',
@@ -96,8 +96,8 @@ async function main() {
factory: null,
},
{
- name: 'IexecEscrowTokenFacet',
- address: addresses['IexecEscrowTokenFacet'],
+ name: 'IexecEscrowFacet',
+ address: addresses['IexecEscrowFacet'],
factory: null,
},
{
@@ -150,9 +150,9 @@ async function main() {
factory: new IexecConfigurationFacet__factory(iexecLibOrders),
},
{
- name: 'IexecEscrowTokenFacet',
+ name: 'IexecEscrowFacet',
address: null,
- factory: new IexecEscrowTokenFacet__factory(),
+ factory: new IexecEscrowFacet__factory(),
},
{
name: 'IexecOrderManagementFacet',
diff --git a/test/000_fullchain-boost.test.ts b/test/000_fullchain-boost.test.ts
index 6834332a7..186cc9e61 100644
--- a/test/000_fullchain-boost.test.ts
+++ b/test/000_fullchain-boost.test.ts
@@ -8,8 +8,8 @@ import { TypedDataDomain } from 'ethers';
import hre from 'hardhat';
import {
IWorkerpool__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
IexecOrderManagement__factory,
IexecPocoBoostAccessorsFacet__factory,
IexecPocoBoostFacet,
@@ -50,7 +50,7 @@ const workerpoolPrice = 1_000_000_000n;
describe('IexecPocoBoostFacet (IT)', function () {
let domain: TypedDataDomain;
let proxyAddress: string;
- let iexecInstance: IexecInterfaceToken;
+ let iexecInstance: IexecInterface;
let iexecPocoBoostInstance: IexecPocoBoostFacet;
let iexecWrapper: IexecWrapper;
let appAddress = '';
@@ -88,7 +88,7 @@ describe('IexecPocoBoostFacet (IT)', function () {
requester: requester,
};
iexecPocoBoostInstance = IexecPocoBoostFacet__factory.connect(proxyAddress, owner);
- iexecInstance = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecInstance = IexecInterface__factory.connect(proxyAddress, anyone);
domain = {
name: 'iExecODB',
version: '5.0.0',
diff --git a/test/000_fullchain.test.ts b/test/000_fullchain.test.ts
index 34644a559..ddda44e86 100644
--- a/test/000_fullchain.test.ts
+++ b/test/000_fullchain.test.ts
@@ -4,7 +4,7 @@
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../typechain';
+import { IexecInterface, IexecInterface__factory } from '../typechain';
import { TAG_STANDARD, TAG_TEE } from '../utils/constants';
import { OrdersActors, OrdersAssets, OrdersPrices, buildOrders } from '../utils/createOrders';
import {
@@ -38,7 +38,7 @@ const { results, resultDigest } = buildUtf8ResultAndDigest('result');
const { resultsCallback, callbackResultDigest } = buildResultCallbackAndDigest(123);
let proxyAddress: string;
-let iexecPoco: IexecInterfaceToken;
+let iexecPoco: IexecInterface;
let iexecWrapper: IexecWrapper;
let [appAddress, workerpoolAddress, datasetAddress]: string[] = [];
let [
@@ -85,7 +85,7 @@ describe('Integration tests', function () {
} = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
ordersActors = {
appOwner: appProvider,
datasetOwner: datasetProvider,
diff --git a/test/200_fullchain-bot.test.ts b/test/200_fullchain-bot.test.ts
index 70b1b5548..9012ac825 100644
--- a/test/200_fullchain-bot.test.ts
+++ b/test/200_fullchain-bot.test.ts
@@ -4,7 +4,7 @@
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../typechain';
+import { IexecInterface, IexecInterface__factory } from '../typechain';
import { TAG_STANDARD } from '../utils/constants';
import { OrdersActors, OrdersAssets, OrdersPrices, buildOrders } from '../utils/createOrders';
import { TaskStatusEnum, buildUtf8ResultAndDigest, getIexecAccounts } from '../utils/poco-tools';
@@ -16,7 +16,7 @@ const datasetPrice = 1_000_000n;
const workerpoolPrice = 1_000_000_000n;
let proxyAddress: string;
-let iexecPoco: IexecInterfaceToken;
+let iexecPoco: IexecInterface;
let iexecWrapper: IexecWrapper;
let [appAddress, workerpoolAddress, datasetAddress]: string[] = [];
let [
@@ -59,7 +59,7 @@ describe('Integration tests', function () {
} = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
ordersActors = {
appOwner: appProvider,
datasetOwner: datasetProvider,
diff --git a/test/201_fullchain-multi-orders.test.ts b/test/201_fullchain-multi-orders.test.ts
index 12c0ff185..4a0c5a649 100644
--- a/test/201_fullchain-multi-orders.test.ts
+++ b/test/201_fullchain-multi-orders.test.ts
@@ -5,7 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ethers } from 'hardhat';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../typechain';
+import { IexecInterface, IexecInterface__factory } from '../typechain';
import { TAG_STANDARD } from '../utils/constants';
import {
IexecOrders,
@@ -31,7 +31,7 @@ const workerpoolPrice2 = 1_000_000_025n;
const { results, resultDigest } = buildUtf8ResultAndDigest('result');
let proxyAddress: string;
-let iexecPoco: IexecInterfaceToken;
+let iexecPoco: IexecInterface;
let iexecWrapper: IexecWrapper;
let [appAddress, workerpoolAddress, datasetAddress]: string[] = [];
let [requester, appProvider, datasetProvider, scheduler, anyone, worker1]: SignerWithAddress[] = [];
@@ -52,7 +52,7 @@ describe('Integration tests', function () {
({ requester, appProvider, datasetProvider, scheduler, anyone, worker1 } = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, ethers.provider);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, ethers.provider);
ordersActors = {
appOwner: appProvider,
datasetOwner: datasetProvider,
diff --git a/test/300_fullchain-reopen.test.ts b/test/300_fullchain-reopen.test.ts
index 1ada1587e..960e916d1 100644
--- a/test/300_fullchain-reopen.test.ts
+++ b/test/300_fullchain-reopen.test.ts
@@ -6,7 +6,7 @@ import { loadFixture, mine } from '@nomicfoundation/hardhat-network-helpers';
import { setNextBlockTimestamp } from '@nomicfoundation/hardhat-network-helpers/dist/src/helpers/time';
import { expect } from 'chai';
import { ZeroAddress } from 'ethers';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../typechain';
+import { IexecInterface, IexecInterface__factory } from '../typechain';
import { OrdersActors, OrdersAssets, OrdersPrices, buildOrders } from '../utils/createOrders';
import { loadHardhatFixtureDeployment } from './utils/hardhat-fixture-deployer';
@@ -26,7 +26,7 @@ const workerpoolPrice = 1_000_000_000n;
const { results, resultDigest } = buildUtf8ResultAndDigest('result');
let proxyAddress: string;
-let [iexecPoco, iexecPocoAsScheduler]: IexecInterfaceToken[] = [];
+let [iexecPoco, iexecPocoAsScheduler]: IexecInterface[] = [];
let iexecWrapper: IexecWrapper;
let [appAddress, workerpoolAddress, datasetAddress]: string[] = [];
let [
@@ -67,7 +67,7 @@ describe('Integration tests', function () {
} = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsScheduler = iexecPoco.connect(scheduler);
ordersActors = {
appOwner: appProvider,
diff --git a/test/byContract/IexecAccessors/IexecAccessorsABILegacy.test.ts b/test/byContract/IexecAccessors/IexecAccessorsABILegacy.test.ts
index db96e062e..bbff2654c 100644
--- a/test/byContract/IexecAccessors/IexecAccessorsABILegacy.test.ts
+++ b/test/byContract/IexecAccessors/IexecAccessorsABILegacy.test.ts
@@ -5,7 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { Wallet, ZeroAddress } from 'ethers';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../../../typechain';
+import { IexecInterface, IexecInterface__factory } from '../../../typechain';
import { TAG_STANDARD } from '../../../utils/constants';
import { OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders';
import {
@@ -30,7 +30,7 @@ const { resultDigest } = buildUtf8ResultAndDigest('result');
const taskIndex = 0n;
let proxyAddress: string;
-let iexecPocoABILegacy: IexecInterfaceToken;
+let iexecPocoABILegacy: IexecInterface;
let iexecWrapper: IexecWrapper;
let [appAddress, workerpoolAddress, datasetAddress]: string[] = [];
let [
@@ -60,7 +60,7 @@ describe('IexecAccessorsABILegacy', function () {
accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPocoABILegacy = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPocoABILegacy = IexecInterface__factory.connect(proxyAddress, anyone);
ordersAssets = {
app: appAddress,
dataset: datasetAddress,
diff --git a/test/byContract/IexecCategoryManager/IexecCategoryManager.test.ts b/test/byContract/IexecCategoryManager/IexecCategoryManager.test.ts
index b92b01b18..14dc8d27f 100644
--- a/test/byContract/IexecCategoryManager/IexecCategoryManager.test.ts
+++ b/test/byContract/IexecCategoryManager/IexecCategoryManager.test.ts
@@ -4,7 +4,7 @@
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../../../typechain';
+import { IexecInterface, IexecInterface__factory } from '../../../typechain';
import config from '../../../utils/config';
import { getIexecAccounts } from '../../../utils/poco-tools';
import { loadHardhatFixtureDeployment } from '../../utils/hardhat-fixture-deployer';
@@ -16,7 +16,7 @@ const args = [name, description, timeRef] as [string, string, number];
describe('CategoryManager', async () => {
let proxyAddress: string;
- let [iexecPoco, iexecPocoAsAnyone]: IexecInterfaceToken[] = [];
+ let [iexecPoco, iexecPocoAsAnyone]: IexecInterface[] = [];
let [iexecAdmin, anyone]: SignerWithAddress[] = [];
beforeEach('Deploy', async () => {
@@ -29,7 +29,7 @@ describe('CategoryManager', async () => {
async function initFixture() {
const accounts = await getIexecAccounts();
({ iexecAdmin, anyone } = accounts);
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, iexecAdmin);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, iexecAdmin);
iexecPocoAsAnyone = iexecPoco.connect(anyone);
}
diff --git a/test/byContract/IexecConfiguration/IexecConfiguration.test.ts b/test/byContract/IexecConfiguration/IexecConfiguration.test.ts
index d79f51365..d87ae2f2b 100644
--- a/test/byContract/IexecConfiguration/IexecConfiguration.test.ts
+++ b/test/byContract/IexecConfiguration/IexecConfiguration.test.ts
@@ -9,8 +9,8 @@ import { ethers } from 'hardhat';
import {
IexecConfigurationExtra,
IexecConfigurationExtra__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
} from '../../../typechain';
import { getIexecAccounts } from '../../../utils/poco-tools';
import { getPocoStorageSlotLocation } from '../../../utils/proxy-tools';
@@ -41,7 +41,7 @@ const someDomainSeparator = '0x0000000000000000000000000000000000000000000000000
describe('IexecConfiguration', async () => {
let proxyAddress: string;
- let [iexecPoco, iexecPocoAsAdmin]: IexecInterfaceToken[] = [];
+ let [iexecPoco, iexecPocoAsAdmin]: IexecInterface[] = [];
let iexecConfigurationExtra: IexecConfigurationExtra;
let [iexecAdmin, worker, anyone]: SignerWithAddress[] = [];
@@ -53,7 +53,7 @@ describe('IexecConfiguration', async () => {
async function initFixture() {
const accounts = await getIexecAccounts();
({ iexecAdmin, worker, anyone } = accounts);
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsAdmin = iexecPoco.connect(iexecAdmin);
iexecConfigurationExtra = IexecConfigurationExtra__factory.connect(proxyAddress, anyone);
}
diff --git a/test/byContract/IexecERC20/IexecERC20.test.ts b/test/byContract/IexecERC20/IexecERC20.test.ts
index 6b015f438..ef69d0baa 100644
--- a/test/byContract/IexecERC20/IexecERC20.test.ts
+++ b/test/byContract/IexecERC20/IexecERC20.test.ts
@@ -7,8 +7,8 @@ import { expect } from 'chai';
import { AddressLike, ZeroAddress } from 'ethers';
import { ethers } from 'hardhat';
import {
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
TestReceiver,
TestReceiver__factory,
} from '../../../typechain';
@@ -22,7 +22,7 @@ const value = 100n;
describe('ERC20', async () => {
let proxyAddress: string;
let iexecWrapper: IexecWrapper;
- let [iexecPoco, iexecPocoAsHolder, iexecPocoAsSpender]: IexecInterfaceToken[] = [];
+ let [iexecPoco, iexecPocoAsHolder, iexecPocoAsSpender]: IexecInterface[] = [];
let [holder, recipient, spender, anyone, zeroAddressSigner]: SignerWithAddress[] = [];
let totalSupplyBeforeFirstDeposit: bigint;
@@ -41,7 +41,7 @@ describe('ERC20', async () => {
zeroAddressSigner = await ethers.getImpersonatedSigner(ZeroAddress);
await setZeroAddressBalance();
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsHolder = iexecPoco.connect(holder);
iexecPocoAsSpender = iexecPoco.connect(spender);
totalSupplyBeforeFirstDeposit = await iexecPoco.totalSupply();
diff --git a/test/byContract/IexecEscrow/IexecEscrowToken-receiveApproval.test.ts b/test/byContract/IexecEscrow/IexecEscrow-receiveApproval.test.ts
similarity index 98%
rename from test/byContract/IexecEscrow/IexecEscrowToken-receiveApproval.test.ts
rename to test/byContract/IexecEscrow/IexecEscrow-receiveApproval.test.ts
index 92c520dce..c73f8428b 100644
--- a/test/byContract/IexecEscrow/IexecEscrowToken-receiveApproval.test.ts
+++ b/test/byContract/IexecEscrow/IexecEscrow-receiveApproval.test.ts
@@ -9,8 +9,8 @@ import { ethers } from 'hardhat';
import { FacetCutAction } from 'hardhat-deploy/dist/types';
import {
DiamondCutFacet__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
MatchOrdersFacetMock__factory,
RLC,
RLC__factory,
@@ -35,7 +35,7 @@ const workerpoolPrice = 1_000_000_000n;
const volume = 1n;
let proxyAddress: string;
-let iexecPoco: IexecInterfaceToken;
+let iexecPoco: IexecInterface;
let rlcInstance: RLC;
let rlcInstanceAsRequester: RLC;
let [iexecAdmin, requester, scheduler, appProvider, datasetProvider, anyone]: SignerWithAddress[] =
@@ -46,7 +46,7 @@ let ordersActors: OrdersActors;
let ordersAssets: OrdersAssets;
let ordersPrices: OrdersPrices;
-describe('IexecEscrowToken-receiveApproval', () => {
+describe('IexecEscrow-receiveApproval', () => {
beforeEach('Deploy', async () => {
proxyAddress = await loadHardhatFixtureDeployment();
await loadFixture(initFixture);
@@ -56,7 +56,7 @@ describe('IexecEscrowToken-receiveApproval', () => {
const accounts = await getIexecAccounts();
({ iexecAdmin, requester, scheduler, appProvider, datasetProvider, anyone } = accounts);
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
rlcInstance = RLC__factory.connect(await iexecPoco.token(), anyone);
rlcInstanceAsRequester = rlcInstance.connect(requester);
@@ -519,7 +519,7 @@ describe('IexecEscrowToken-receiveApproval', () => {
*/
async function matchOrdersCalldata(orders: IexecOrders) {
// Calldata can also be created using
- // IexecInterfaceToken__factory.createInterface().encodeFunctionData('matchOrders', orders);
+ // IexecInterface__factory.createInterface().encodeFunctionData('matchOrders', orders);
return await iexecPoco.matchOrders
.populateTransaction(...orders.toArray())
.then((tx) => tx.data);
diff --git a/test/byContract/IexecEscrow/IexecEscrowToken.test.ts b/test/byContract/IexecEscrow/IexecEscrow.test.ts
similarity index 98%
rename from test/byContract/IexecEscrow/IexecEscrowToken.test.ts
rename to test/byContract/IexecEscrow/IexecEscrow.test.ts
index 10978d2ec..626135fea 100644
--- a/test/byContract/IexecEscrow/IexecEscrowToken.test.ts
+++ b/test/byContract/IexecEscrow/IexecEscrow.test.ts
@@ -6,21 +6,16 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ethers } from 'hardhat';
-import {
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
- RLC,
- RLC__factory,
-} from '../../../typechain';
+import { IexecInterface, IexecInterface__factory, RLC, RLC__factory } from '../../../typechain';
import { getIexecAccounts } from '../../../utils/poco-tools';
import { loadHardhatFixtureDeployment } from '../../utils/hardhat-fixture-deployer';
import { setZeroAddressBalance } from '../../utils/utils';
const amount = ethers.parseUnits('100', 9);
-describe('IexecEscrowToken', () => {
+describe('IexecEscrow', () => {
let proxyAddress: string;
- let [iexecPoco, , iexecPocoAsAccountA, iexecPocoAsAdmin]: IexecInterfaceToken[] = [];
+ let [iexecPoco, , iexecPocoAsAccountA, iexecPocoAsAdmin]: IexecInterface[] = [];
let [iexecAdmin, accountA, accountB, accountC, anyone]: SignerWithAddress[] = [];
let [rlcInstance, rlcInstanceAsAccountA]: RLC[] = [];
@@ -39,7 +34,7 @@ describe('IexecEscrowToken', () => {
anyone,
} = accounts);
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsAccountA = iexecPoco.connect(accountA);
iexecPocoAsAdmin = iexecPoco.connect(iexecAdmin);
rlcInstance = RLC__factory.connect(await iexecPoco.token(), anyone);
diff --git a/test/byContract/IexecOrderManagement/IexecOrderManagement.test.ts b/test/byContract/IexecOrderManagement/IexecOrderManagement.test.ts
index 7b58ad427..844e97291 100644
--- a/test/byContract/IexecOrderManagement/IexecOrderManagement.test.ts
+++ b/test/byContract/IexecOrderManagement/IexecOrderManagement.test.ts
@@ -5,11 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ethers } from 'hardhat';
-import {
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
- IexecLibOrders_v5,
-} from '../../../typechain';
+import { IexecInterface, IexecInterface__factory, IexecLibOrders_v5 } from '../../../typechain';
import { NULL } from '../../../utils/constants';
import { buildOrders, createOrderOperation } from '../../../utils/createOrders';
import { OrderOperationEnum, getIexecAccounts } from '../../../utils/poco-tools';
@@ -27,7 +23,7 @@ describe('OrderManagement', async () => {
iexecPocoAsDatasetProvider,
iexecPocoAsScheduler,
iexecPocoAsRequester,
- ]: IexecInterfaceToken[] = [];
+ ]: IexecInterface[] = [];
let iexecWrapper: IexecWrapper;
let [anyone, appProvider, datasetProvider, scheduler, requester]: SignerWithAddress[] = [];
let appOrder: IexecLibOrders_v5.AppOrderStruct;
@@ -46,7 +42,7 @@ describe('OrderManagement', async () => {
({ appProvider, datasetProvider, scheduler, requester, anyone } = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
const { appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets();
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsAppProvider = iexecPoco.connect(appProvider);
iexecPocoAsDatasetProvider = iexecPoco.connect(datasetProvider);
iexecPocoAsScheduler = iexecPoco.connect(scheduler);
diff --git a/test/byContract/IexecPoco/IexecPoco1.test.ts b/test/byContract/IexecPoco/IexecPoco1.test.ts
index 6cb07c235..8e25c2f71 100644
--- a/test/byContract/IexecPoco/IexecPoco1.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco1.test.ts
@@ -9,8 +9,8 @@ import { ethers } from 'hardhat';
import {
ERC1271Mock__factory,
IERC721__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
IexecLibOrders_v5,
IexecPocoAccessors,
IexecPocoAccessors__factory,
@@ -66,8 +66,8 @@ const someWallet = Wallet.createRandom();
describe('IexecPoco1', () => {
let proxyAddress: string;
- let [iexecPoco, iexecPocoAsRequester]: IexecInterfaceToken[] = [];
- let iexecPocoAsSponsor: IexecInterfaceToken;
+ let [iexecPoco, iexecPocoAsRequester]: IexecInterface[] = [];
+ let iexecPocoAsSponsor: IexecInterface;
let iexecPocoAccessors: IexecPocoAccessors;
let iexecPocoContract: Contract;
let iexecWrapper: IexecWrapper;
@@ -113,7 +113,7 @@ describe('IexecPoco1', () => {
accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsRequester = iexecPoco.connect(requester);
iexecPocoAsSponsor = iexecPoco.connect(sponsor);
iexecPocoAccessors = IexecPocoAccessors__factory.connect(proxyAddress, ethers.provider);
diff --git a/test/byContract/IexecPoco/IexecPoco2-claim.test.ts b/test/byContract/IexecPoco/IexecPoco2-claim.test.ts
index 98da268c4..5955529ee 100644
--- a/test/byContract/IexecPoco/IexecPoco2-claim.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco2-claim.test.ts
@@ -5,7 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture, mine, time } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ZeroAddress, ethers } from 'ethers';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../../../typechain';
+import { IexecInterface, IexecInterface__factory } from '../../../typechain';
import { OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders';
import {
TaskStatusEnum,
@@ -30,8 +30,8 @@ const enclaveAddress = ZeroAddress;
describe('IexecPoco2#claim', async () => {
let proxyAddress: string;
- let iexecPoco: IexecInterfaceToken;
- let iexecPocoAsAnyone: IexecInterfaceToken;
+ let iexecPoco: IexecInterface;
+ let iexecPocoAsAnyone: IexecInterface;
let iexecWrapper: IexecWrapper;
let [appAddress, datasetAddress, workerpoolAddress]: string[] = [];
let [iexecAdmin, requester, sponsor, scheduler, worker1, worker2, anyone]: SignerWithAddress[] =
@@ -52,7 +52,7 @@ describe('IexecPoco2#claim', async () => {
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000');
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, iexecAdmin);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, iexecAdmin);
iexecPocoAsAnyone = iexecPoco.connect(anyone);
ordersAssets = {
app: appAddress,
diff --git a/test/byContract/IexecPoco/IexecPoco2-contribute-and-finalize.test.ts b/test/byContract/IexecPoco/IexecPoco2-contribute-and-finalize.test.ts
index 270c197fe..6a07801ea 100644
--- a/test/byContract/IexecPoco/IexecPoco2-contribute-and-finalize.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco2-contribute-and-finalize.test.ts
@@ -5,11 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { Wallet, ZeroAddress, ethers } from 'ethers';
-import {
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
- TestClient__factory,
-} from '../../../typechain';
+import { IexecInterface, IexecInterface__factory, TestClient__factory } from '../../../typechain';
import config from '../../../utils/config';
import { TAG_STANDARD, TAG_TEE } from '../../../utils/constants';
import { OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders';
@@ -41,7 +37,7 @@ const noResultsData = '0x';
const { results, resultDigest } = buildUtf8ResultAndDigest('result');
let proxyAddress: string;
-let [iexecPoco, iexecPocoAsWorker]: IexecInterfaceToken[] = [];
+let [iexecPoco, iexecPocoAsWorker]: IexecInterface[] = [];
let iexecWrapper: IexecWrapper;
let [
requester,
@@ -70,7 +66,7 @@ describe('IexecPoco2#contributeAndFinalize', () => {
accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
const { appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets();
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsWorker = iexecPoco.connect(worker);
const appPrice = 1000n;
const datasetPrice = 1_000_000n;
diff --git a/test/byContract/IexecPoco/IexecPoco2-contribute.test.ts b/test/byContract/IexecPoco/IexecPoco2-contribute.test.ts
index a8931ed6a..34bb12959 100644
--- a/test/byContract/IexecPoco/IexecPoco2-contribute.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco2-contribute.test.ts
@@ -5,7 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers';
import { assert, expect } from 'chai';
import { ZeroAddress } from 'ethers';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../../../typechain';
+import { IexecInterface, IexecInterface__factory } from '../../../typechain';
import config from '../../../utils/config';
import { NULL, TAG_STANDARD, TAG_TEE } from '../../../utils/constants';
import { IexecOrders, OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders';
@@ -32,7 +32,7 @@ const emptyEnclaveSignature = NULL.SIGNATURE;
describe('IexecPoco2#contribute', () => {
let proxyAddress: string;
- let [iexecPoco, iexecPocoAsWorker]: IexecInterfaceToken[] = [];
+ let [iexecPoco, iexecPocoAsWorker]: IexecInterface[] = [];
let iexecWrapper: IexecWrapper;
let [
anyone,
@@ -71,7 +71,7 @@ describe('IexecPoco2#contribute', () => {
} = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
const { appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets();
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsWorker = iexecPoco.connect(worker);
const appPrice = 1000n;
const datasetPrice = 1_000_000n;
diff --git a/test/byContract/IexecPoco/IexecPoco2-finalize.test.ts b/test/byContract/IexecPoco/IexecPoco2-finalize.test.ts
index 0c1a25930..bfa46d025 100644
--- a/test/byContract/IexecPoco/IexecPoco2-finalize.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco2-finalize.test.ts
@@ -7,8 +7,8 @@ import { expect } from 'chai';
import { AbiCoder, Wallet, ZeroAddress } from 'ethers';
import { ethers } from 'hardhat';
import {
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
OwnableMock__factory,
TestClient__factory,
} from '../../../typechain';
@@ -38,7 +38,7 @@ const emptyEnclaveSignature = '0x';
describe('IexecPoco2#finalize', async () => {
let proxyAddress: string;
- let [iexecPoco, iexecPocoAsScheduler]: IexecInterfaceToken[] = [];
+ let [iexecPoco, iexecPocoAsScheduler]: IexecInterface[] = [];
let iexecWrapper: IexecWrapper;
let [appAddress, datasetAddress, workerpoolAddress]: string[] = [];
let [
@@ -80,7 +80,7 @@ describe('IexecPoco2#finalize', async () => {
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000');
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsScheduler = iexecPoco.connect(scheduler);
ordersAssets = {
app: appAddress,
diff --git a/test/byContract/IexecPoco/IexecPoco2-initialize.test.ts b/test/byContract/IexecPoco/IexecPoco2-initialize.test.ts
index 7752da19c..86b546ec4 100644
--- a/test/byContract/IexecPoco/IexecPoco2-initialize.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco2-initialize.test.ts
@@ -5,7 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ethers } from 'hardhat';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../../../typechain';
+import { IexecInterface, IexecInterface__factory } from '../../../typechain';
import {
OrdersAssets,
OrdersPrices,
@@ -23,8 +23,8 @@ const workerpoolPrice = 1_000_000_000n;
describe('IexecPoco2#initialize', async () => {
let proxyAddress: string;
- let iexecPoco: IexecInterfaceToken;
- let iexecPocoAsAnyone: IexecInterfaceToken;
+ let iexecPoco: IexecInterface;
+ let iexecPocoAsAnyone: IexecInterface;
let iexecWrapper: IexecWrapper;
let [appAddress, datasetAddress, workerpoolAddress]: string[] = [];
let [iexecAdmin, requester, anyone]: SignerWithAddress[] = [];
@@ -44,7 +44,7 @@ describe('IexecPoco2#initialize', async () => {
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000');
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, iexecAdmin);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, iexecAdmin);
iexecPocoAsAnyone = iexecPoco.connect(anyone);
ordersAssets = {
app: appAddress,
diff --git a/test/byContract/IexecPoco/IexecPoco2-reopen.test.ts b/test/byContract/IexecPoco/IexecPoco2-reopen.test.ts
index 5319074a3..911f880b3 100644
--- a/test/byContract/IexecPoco/IexecPoco2-reopen.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco2-reopen.test.ts
@@ -6,7 +6,7 @@ import { loadFixture, mine, time } from '@nomicfoundation/hardhat-network-helper
import { setNextBlockTimestamp } from '@nomicfoundation/hardhat-network-helpers/dist/src/helpers/time';
import { expect } from 'chai';
import { ZeroAddress, ZeroHash } from 'ethers';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../../../typechain';
+import { IexecInterface, IexecInterface__factory } from '../../../typechain';
import { OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders';
import {
ContributionStatusEnum,
@@ -27,7 +27,7 @@ const resultDigest = buildUtf8ResultAndDigest('result').resultDigest;
describe('IexecPoco2#reopen', async () => {
let proxyAddress: string;
- let [iexecPoco, iexecPocoAsScheduler, iexecPocoAsWorker]: IexecInterfaceToken[] = [];
+ let [iexecPoco, iexecPocoAsScheduler, iexecPocoAsWorker]: IexecInterface[] = [];
let iexecWrapper: IexecWrapper;
let [appAddress, datasetAddress, workerpoolAddress]: string[] = [];
let [
@@ -57,7 +57,7 @@ describe('IexecPoco2#reopen', async () => {
({ requester, scheduler, worker, worker1, worker2, worker3, worker4, anyone } = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsScheduler = iexecPoco.connect(scheduler);
iexecPocoAsWorker = iexecPoco.connect(worker);
ordersAssets = {
diff --git a/test/byContract/IexecPoco/IexecPoco2-reveal.test.ts b/test/byContract/IexecPoco/IexecPoco2-reveal.test.ts
index 1f749b659..6fb6414f1 100644
--- a/test/byContract/IexecPoco/IexecPoco2-reveal.test.ts
+++ b/test/byContract/IexecPoco/IexecPoco2-reveal.test.ts
@@ -5,7 +5,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ZeroAddress, ethers } from 'ethers';
-import { IexecInterfaceToken, IexecInterfaceToken__factory } from '../../../typechain';
+import { IexecInterface, IexecInterface__factory } from '../../../typechain';
import { NULL, TAG_STANDARD } from '../../../utils/constants';
import { IexecOrders, OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders';
import {
@@ -28,7 +28,7 @@ const emptyEnclaveSignature = NULL.SIGNATURE;
describe('IexecPoco2#reveal', () => {
let proxyAddress: string;
- let [iexecPoco, iexecPocoAsWorker]: IexecInterfaceToken[] = [];
+ let [iexecPoco, iexecPocoAsWorker]: IexecInterface[] = [];
let iexecWrapper: IexecWrapper;
let [
anyone,
@@ -58,7 +58,7 @@ describe('IexecPoco2#reveal', () => {
({ scheduler, worker, worker1, worker2, worker3, worker4, requester, anyone } = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
const { appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets();
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
iexecPocoAsWorker = iexecPoco.connect(worker);
const appPrice = 1000n;
const datasetPrice = 1_000_000n;
diff --git a/test/byContract/IexecPocoBoost/IexecPocoBoost.test.ts b/test/byContract/IexecPocoBoost/IexecPocoBoost.test.ts
index 05c2a1ec9..dbdb68ad9 100644
--- a/test/byContract/IexecPocoBoost/IexecPocoBoost.test.ts
+++ b/test/byContract/IexecPocoBoost/IexecPocoBoost.test.ts
@@ -16,8 +16,8 @@ import {
IOracleConsumer__factory,
IexecConfiguration,
IexecConfiguration__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
IexecOrderManagement__factory,
IexecPoco2__factory,
IexecPocoAccessors__factory,
@@ -75,7 +75,7 @@ const randomEOAAddress = randomAddress();
let proxyAddress: string;
let iexecPocoBoostInstance: IexecPocoBoostFacet;
let iexecConfigurationAsAdmin: IexecConfiguration;
-let iexecPocoAccessor: IexecInterfaceToken;
+let iexecPocoAccessor: IexecInterface;
let oracleConsumerInstance: TestClient;
let gasWasterClientInstance: GasWasterClient;
let gasWasterClientAddress: string;
@@ -130,7 +130,7 @@ describe('IexecPocoBoost', function () {
proxyAddress,
accounts.iexecAdmin,
);
- iexecPocoAccessor = IexecInterfaceToken__factory.connect(proxyAddress, ethers.provider);
+ iexecPocoAccessor = IexecInterface__factory.connect(proxyAddress, ethers.provider);
ordersActors = {
appOwner: appProvider,
datasetOwner: datasetProvider,
diff --git a/test/byContract/IexecRelay/IexecRelay.test.ts b/test/byContract/IexecRelay/IexecRelay.test.ts
index ac9d3a39d..1f8b40434 100644
--- a/test/byContract/IexecRelay/IexecRelay.test.ts
+++ b/test/byContract/IexecRelay/IexecRelay.test.ts
@@ -4,11 +4,7 @@
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ethers } from 'hardhat';
-import {
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
- IexecLibOrders_v5,
-} from '../../../typechain';
+import { IexecInterface, IexecInterface__factory, IexecLibOrders_v5 } from '../../../typechain';
import { getIexecAccounts } from '../../../utils/poco-tools';
import { loadHardhatFixtureDeployment } from '../../utils/hardhat-fixture-deployer';
import { randomAddress } from '../../utils/utils';
@@ -25,7 +21,7 @@ let sign: string;
describe('IexecRelay', async () => {
let proxyAddress: string;
- let iexecPoco: IexecInterfaceToken;
+ let iexecPoco: IexecInterface;
let [app, dataset, workerpool, requester, beneficiary]: string[] = [];
beforeEach('Deploy', async () => {
@@ -35,7 +31,7 @@ describe('IexecRelay', async () => {
async function initFixture() {
const accounts = await getIexecAccounts();
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, accounts.anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, accounts.anyone);
[app, dataset, workerpool, requester, beneficiary] = Array(5).fill(randomAddress());
sign = await ethers.Wallet.createRandom().signMessage('sign');
}
diff --git a/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts b/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts
index b132006f7..fbec2be6d 100644
--- a/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts
+++ b/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts
@@ -6,11 +6,7 @@ import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { expect } from 'chai';
import { ZeroAddress, ZeroHash } from 'ethers';
import { deployments, ethers } from 'hardhat';
-import {
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
- IexecLibOrders_v5,
-} from '../../../typechain';
+import { IexecInterface, IexecInterface__factory, IexecLibOrders_v5 } from '../../../typechain';
import {
OrdersAssets,
OrdersPrices,
@@ -50,7 +46,7 @@ const { results, resultDigest } = buildUtf8ResultAndDigest('result');
const { resultsCallback, callbackResultDigest } = buildResultCallbackAndDigest(123);
let proxyAddress: string;
-let iexecPoco: IexecInterfaceToken;
+let iexecPoco: IexecInterface;
let iexecWrapper: IexecWrapper;
let [appAddress, datasetAddress, workerpoolAddress]: string[] = [];
let [requester, appProvider, datasetProvider, scheduler, worker1, anyone]: SignerWithAddress[] = [];
@@ -70,7 +66,7 @@ describe('IexecPocoAccessors', async () => {
({ requester, appProvider, datasetProvider, scheduler, worker1, anyone } = accounts);
iexecWrapper = new IexecWrapper(proxyAddress, accounts);
({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, ethers.provider);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, ethers.provider);
ordersAssets = {
app: appAddress,
dataset: datasetAddress,
diff --git a/test/byContract/registries/assets.test.ts b/test/byContract/registries/assets.test.ts
index 2d9b2623b..f5be3f4f8 100644
--- a/test/byContract/registries/assets.test.ts
+++ b/test/byContract/registries/assets.test.ts
@@ -15,8 +15,8 @@ import {
DatasetRegistry,
DatasetRegistry__factory,
Dataset__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
Workerpool,
WorkerpoolRegistry,
WorkerpoolRegistry__factory,
@@ -55,7 +55,7 @@ const createWorkerpoolArgs = Object.values(createWorkerpoolParams) as [string];
describe('Assets', () => {
let proxyAddress: string;
- let iexecPoco: IexecInterfaceToken;
+ let iexecPoco: IexecInterface;
let [appProvider, datasetProvider, scheduler, anyone]: SignerWithAddress[] = [];
let appRegistry: AppRegistry;
@@ -74,7 +74,7 @@ describe('Assets', () => {
async function initFixture() {
({ appProvider, datasetProvider, scheduler, anyone } = await getIexecAccounts());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
appRegistry = AppRegistry__factory.connect(await iexecPoco.appregistry(), anyone);
datasetRegistry = DatasetRegistry__factory.connect(
diff --git a/test/byContract/registries/registries.test.ts b/test/byContract/registries/registries.test.ts
index 98428c63b..1e191319c 100644
--- a/test/byContract/registries/registries.test.ts
+++ b/test/byContract/registries/registries.test.ts
@@ -13,8 +13,8 @@ import {
DatasetRegistry,
DatasetRegistry__factory,
Dataset__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
InitializableUpgradeabilityProxy__factory,
WorkerpoolRegistry,
WorkerpoolRegistry__factory,
@@ -29,7 +29,7 @@ import { randomAddress } from '../../utils/utils';
describe('Registries', () => {
let proxyAddress: string;
- let iexecPoco: IexecInterfaceToken;
+ let iexecPoco: IexecInterface;
let [iexecAdmin, appProvider, datasetProvider, scheduler, anyone]: SignerWithAddress[] = [];
let [appRegistry, appRegistryAsAdmin]: AppRegistry[] = [];
@@ -48,7 +48,7 @@ describe('Registries', () => {
({ iexecAdmin, appProvider, datasetProvider, scheduler, anyone } =
await getIexecAccounts());
- iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, anyone);
+ iexecPoco = IexecInterface__factory.connect(proxyAddress, anyone);
appRegistry = AppRegistry__factory.connect(await iexecPoco.appregistry(), anyone);
appRegistryAddress = await appRegistry.getAddress();
diff --git a/test/utils/IexecWrapper.ts b/test/utils/IexecWrapper.ts
index e4c38be80..d261ad74e 100644
--- a/test/utils/IexecWrapper.ts
+++ b/test/utils/IexecWrapper.ts
@@ -18,8 +18,8 @@ import {
DatasetRegistry,
DatasetRegistry__factory,
IWorkerpool__factory,
- IexecInterfaceToken,
- IexecInterfaceToken__factory,
+ IexecInterface,
+ IexecInterface__factory,
IexecLibOrders_v5,
IexecPocoBoostAccessors__factory,
RLC__factory,
@@ -54,13 +54,13 @@ export const DATASET_CHECKSUM =
'0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321';
export class IexecWrapper {
proxyAddress: string;
- iexecPoco: IexecInterfaceToken;
+ iexecPoco: IexecInterface;
accounts: IexecAccounts;
domain: TypedDataDomain;
constructor(proxyAddress: string, accounts: IexecAccounts) {
this.proxyAddress = proxyAddress;
- this.iexecPoco = IexecInterfaceToken__factory.connect(this.proxyAddress, ethers.provider);
+ this.iexecPoco = IexecInterface__factory.connect(this.proxyAddress, ethers.provider);
this.accounts = accounts;
this.domain = {
name: 'iExecODB',
diff --git a/test/utils/fixture-helpers.ts b/test/utils/fixture-helpers.ts
index 473b7b50b..bde714d58 100644
--- a/test/utils/fixture-helpers.ts
+++ b/test/utils/fixture-helpers.ts
@@ -3,7 +3,7 @@
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { deployments, ethers } from 'hardhat';
-import { IexecInterfaceToken__factory, Registry__factory } from '../../typechain';
+import { IexecInterface__factory, Registry__factory } from '../../typechain';
import { getIexecAccounts } from '../../utils/poco-tools';
/**
@@ -21,7 +21,7 @@ export async function fundAccounts(tokenAddress: string, richmanAddress: string)
console.log(`Rich account ${richmanAddress} sending RLCs to other accounts..`);
const richmanSigner = await ethers.getImpersonatedSigner(richmanAddress);
- const tokenContract = IexecInterfaceToken__factory.connect(tokenAddress, richmanSigner);
+ const tokenContract = IexecInterface__factory.connect(tokenAddress, richmanSigner);
for (let i = 0; i < accountsArray.length; i++) {
const account = accountsArray[i];
@@ -89,7 +89,7 @@ export async function transferRegistryOwnership(registryName: string, registryAd
*/
export async function transferProxyOwnership(proxyAddress: string) {
const accounts = await getIexecAccounts();
- const iexecPoco = IexecInterfaceToken__factory.connect(proxyAddress, ethers.provider);
+ const iexecPoco = IexecInterface__factory.connect(proxyAddress, ethers.provider);
const pocoOwner = await iexecPoco.owner();
const newIexecAdminAddress = accounts.iexecAdmin.address;
diff --git a/utils/proxy-tools.ts b/utils/proxy-tools.ts
index 74c8d13ed..7d89cd5c4 100644
--- a/utils/proxy-tools.ts
+++ b/utils/proxy-tools.ts
@@ -15,7 +15,7 @@ import {
IexecCategoryManagerFacet__factory,
IexecConfigurationExtraFacet__factory,
IexecConfigurationFacet__factory,
- IexecEscrowTokenFacet__factory,
+ IexecEscrowFacet__factory,
IexecOrderManagementFacet__factory,
IexecPoco1Facet__factory,
IexecPoco2Facet__factory,
@@ -139,7 +139,7 @@ function getAllLocalFacetFunctions(): Map {
IexecCategoryManagerFacet__factory.createInterface(),
IexecConfigurationExtraFacet__factory.createInterface(),
IexecConfigurationFacet__factory.createInterface(),
- IexecEscrowTokenFacet__factory.createInterface(),
+ IexecEscrowFacet__factory.createInterface(),
IexecOrderManagementFacet__factory.createInterface(),
IexecPoco1Facet__factory.createInterface(),
IexecPoco2Facet__factory.createInterface(),
From 2aec8ae1d4c46c82e14138ac9dfabf18fd44a76a Mon Sep 17 00:00:00 2001
From: Zied <26070035+zguesmi@users.noreply.github.com>
Date: Wed, 2 Sep 2026 12:06:17 +0200
Subject: [PATCH 2/9] refactor: hold the protocol constants in ConstantsLib
FacetBase declared the eight protocol constants, which put them out of reach
of the helper libraries. A library cannot inherit FacetBase, and a contract
constant is not readable from outside its own contract at any visibility:
solc 0.8.21 rejects `FacetBase.GROUPMEMBER_PURPOSE` from a library with
"Member not found or not visible after argument-dependent lookup", with both
internal and public visibility. CommonLib therefore carried a second, private
copy of GROUPMEMBER_PURPOSE.
A library constant carries no such restriction. ConstantsLib now holds the
single declaration of all eight, CommonLib reads
ConstantsLib.GROUPMEMBER_PURPOSE and drops its copy, and FacetBase keeps the
eight names as aliases of the library's values. The aliases matter: the 31
bare uses in the facets and the eight public getters on
IexecPocoAccessorsFacet stay exactly as they were.
Measured on solc 0.8.21 with viaIR. No ABI changes anywhere. Constant folding
survives the indirection: the deployed bytecode still holds one PUSH5 for 1e9
and one PUSH20 for the kitty address in each facet that reads them, so the
aliases fold back to the same literals. Four facets grew a little jump-offset
churn against the previous commit, IexecPoco1Facet by 8 bytes, IexecPocoBoost-
Facet by 32, IexecPoco2Facet by 40 and IexecPocoAccessorsFacet by 48. The
other eight facets are byte-identical once the trailing metadata is stripped.
The largest, IexecPocoBoostFacet, sits at 16641 of the 24576-byte limit.
---
contracts/abstract/FacetBase.sol | 32 ++++++++++++----------------
contracts/libs/CommonLib.sol | 6 ++----
contracts/libs/ConstantsLib.sol | 36 ++++++++++++++++++++++++++++++++
docs/solidity/index.md | 10 +++++++++
4 files changed, 61 insertions(+), 23 deletions(-)
create mode 100644 contracts/libs/ConstantsLib.sol
diff --git a/contracts/abstract/FacetBase.sol b/contracts/abstract/FacetBase.sol
index 2cd15a438..08f94c1cc 100644
--- a/contracts/abstract/FacetBase.sol
+++ b/contracts/abstract/FacetBase.sol
@@ -3,6 +3,7 @@
pragma solidity ^0.8.0;
+import {ConstantsLib} from "../libs/ConstantsLib.sol";
import {PocoStorageLib} from "../libs/PocoStorageLib.sol";
import {IERC5313} from "@openzeppelin/contracts/interfaces/IERC5313.sol";
@@ -13,25 +14,18 @@ import {IERC5313} from "@openzeppelin/contracts/interfaces/IERC5313.sol";
* @dev Every facet must inherit from this contract.
*/
abstract contract FacetBase {
- // TODO move these constants to a ConstantsLib library and reference them as
- // ConstantsLib. 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;
- 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 = 1e9; // ADJUSTEMENT VARIABLE
-
- // Seized funds of workerpools that do not honor their deals are sent
- // out to this kitty address.
- // It is determined with address(uint256(keccak256(bytes('iExecKitty'))) - 1).
- address internal constant KITTY_ADDRESS = 0x99c2268479b93fDe36232351229815DF80837e23;
-
- // Used with ERC-734 Key Manager identity contract for authorization management.
- uint256 internal constant GROUPMEMBER_PURPOSE = 4;
+ // Aliases of the protocol constants, so that every facet inheriting this
+ // contract keeps reading them under their bare names. {ConstantsLib} holds
+ // the single declaration; solc folds each alias back to the same literal.
+ uint256 internal constant CONTRIBUTION_DEADLINE_RATIO =
+ ConstantsLib.CONTRIBUTION_DEADLINE_RATIO;
+ uint256 internal constant REVEAL_DEADLINE_RATIO = ConstantsLib.REVEAL_DEADLINE_RATIO;
+ uint256 internal constant FINAL_DEADLINE_RATIO = ConstantsLib.FINAL_DEADLINE_RATIO;
+ uint256 internal constant WORKERPOOL_STAKE_RATIO = ConstantsLib.WORKERPOOL_STAKE_RATIO;
+ uint256 internal constant KITTY_RATIO = ConstantsLib.KITTY_RATIO;
+ uint256 internal constant KITTY_MIN = ConstantsLib.KITTY_MIN;
+ address internal constant KITTY_ADDRESS = ConstantsLib.KITTY_ADDRESS;
+ uint256 internal constant GROUPMEMBER_PURPOSE = ConstantsLib.GROUPMEMBER_PURPOSE;
modifier onlyOwner() {
require(_msgSender() == owner(), "Ownable: caller is not the owner");
diff --git a/contracts/libs/CommonLib.sol b/contracts/libs/CommonLib.sol
index d394735e0..241d2da44 100644
--- a/contracts/libs/CommonLib.sol
+++ b/contracts/libs/CommonLib.sol
@@ -8,6 +8,7 @@ import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {IERC734} from "../external/interfaces/IERC734.sol";
+import {ConstantsLib} from "./ConstantsLib.sol";
import {PocoStorageLib} from "./PocoStorageLib.sol";
/**
@@ -18,9 +19,6 @@ library CommonLib {
using ECDSA for bytes32;
using Math for uint256;
- // Used with ERC-734 Key Manager identity contract for authorization management.
- uint256 private constant GROUPMEMBER_PURPOSE = 4;
-
/**
* Hash a Typed Data using the configured domain.
* @param structHash The original structure hash.
@@ -147,7 +145,7 @@ library CommonLib {
try
IERC734(restriction).keyHasPurpose( // ERC734 identity contract restriction
bytes32(uint256(uint160(account))),
- GROUPMEMBER_PURPOSE
+ ConstantsLib.GROUPMEMBER_PURPOSE
)
returns (bool success) {
return success;
diff --git a/contracts/libs/ConstantsLib.sol b/contracts/libs/ConstantsLib.sol
new file mode 100644
index 000000000..1b8edf4e1
--- /dev/null
+++ b/contracts/libs/ConstantsLib.sol
@@ -0,0 +1,36 @@
+// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH
+// SPDX-License-Identifier: Apache-2.0
+
+pragma solidity ^0.8.0;
+
+/**
+ * @title The protocol constants of PoCo.
+ * @notice The single declaration of every protocol constant. {FacetBase} aliases
+ * them so the facets keep reading them under their bare names.
+ * @dev They live in a library, not in a base contract, because a library cannot
+ * inherit and a contract constant is not readable from outside its own contract
+ * at any visibility. A library constant carries no such restriction, so both the
+ * facets and the helper libraries reach the same declaration.
+ */
+library ConstantsLib {
+ // Deadline ratios, expressed as multiples of the category time frame.
+ uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7;
+ uint256 internal constant REVEAL_DEADLINE_RATIO = 2;
+ uint256 internal constant FINAL_DEADLINE_RATIO = 10;
+
+ // Share of the deal price a workerpool must stake, as a percentage.
+ uint256 internal constant WORKERPOOL_STAKE_RATIO = 30;
+
+ // Share of the kitty released to a workerpool on each reward, as a
+ // percentage, and the floor below which the whole kitty is released.
+ uint256 internal constant KITTY_RATIO = 10;
+ uint256 internal constant KITTY_MIN = 1e9; // ADJUSTEMENT VARIABLE
+
+ // Seized funds of workerpools that do not honor their deals are sent
+ // out to this kitty address.
+ // It is determined with address(uint256(keccak256(bytes('iExecKitty'))) - 1).
+ address internal constant KITTY_ADDRESS = 0x99c2268479b93fDe36232351229815DF80837e23;
+
+ // Used with ERC-734 Key Manager identity contract for authorization management.
+ uint256 internal constant GROUPMEMBER_PURPOSE = 4;
+}
diff --git a/docs/solidity/index.md b/docs/solidity/index.md
index 65d4c4f4b..8a8fd2fa3 100644
--- a/docs/solidity/index.md
+++ b/docs/solidity/index.md
@@ -793,6 +793,16 @@ function broadcastWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrder _work
function broadcastRequestOrder(struct IexecLibOrders_v5.RequestOrder _requestorder) external
```
+## ConstantsLib
+
+The single declaration of every protocol constant. {FacetBase} aliases
+them so the facets keep reading them under their bare names.
+
+_They live in a library, not in a base contract, because a library cannot
+inherit and a contract constant is not readable from outside its own contract
+at any visibility. A library constant carries no such restriction, so both the
+facets and the helper libraries reach the same declaration._
+
## EscrowLib
The escrow layers on top of the sRLC ledger: it owns `m_frozens` and
From aa2d79f22b6755e713392c5323bd3553854af89f Mon Sep 17 00:00:00 2001
From: Zied <26070035+zguesmi@users.noreply.github.com>
Date: Thu, 3 Sep 2026 11:39:27 +0200
Subject: [PATCH 3/9] chore: clean comments
---
contracts/IexecInterface.sol | 6 ++----
contracts/libs/ConstantsLib.sol | 8 +-------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/contracts/IexecInterface.sol b/contracts/IexecInterface.sol
index efd228dba..daa6b5234 100644
--- a/contracts/IexecInterface.sol
+++ b/contracts/IexecInterface.sol
@@ -24,14 +24,12 @@ import {IOwnable} from "./interfaces/IOwnable.sol";
/**
* A global interface that aggregates all the interfaces needed to interact with
* the PoCo contracts.
- * @dev Referenced in the SDK with the path `contracts/IexecInterface.sol`.
+ * @dev TODO Referenced in the SDK with the old path `contracts/IexecInterfaceToken.sol`.
+ * The SDK should be updated to use the new path `contracts/IexecInterface.sol`.
* Changing the name or the path would cause a breaking change in the SDK.
*/
// TODO Remove the interface `IexecAccessorsABILegacy` when it's not used in the middleware anymore.
// https://github.com/iExecBlockchainComputing/iexec-commons-poco/blob/819cd008/generateContractWrappers#L7
-// TODO Add the interfaces `IexecPocoBoost` and `IexecPocoBoostAccessors` once the Boost facets
-// are deployed on every network. They are not deployed on Arbitrum mainnet nor on Arbitrum
-// Sepolia today, so aggregating them here would make the SDK advertise functions that revert.
interface IexecInterface is
IexecAccessorsABILegacy,
IexecCategoryManager,
diff --git a/contracts/libs/ConstantsLib.sol b/contracts/libs/ConstantsLib.sol
index 1b8edf4e1..c01e4a9f4 100644
--- a/contracts/libs/ConstantsLib.sol
+++ b/contracts/libs/ConstantsLib.sol
@@ -4,13 +4,7 @@
pragma solidity ^0.8.0;
/**
- * @title The protocol constants of PoCo.
- * @notice The single declaration of every protocol constant. {FacetBase} aliases
- * them so the facets keep reading them under their bare names.
- * @dev They live in a library, not in a base contract, because a library cannot
- * inherit and a contract constant is not readable from outside its own contract
- * at any visibility. A library constant carries no such restriction, so both the
- * facets and the helper libraries reach the same declaration.
+ * @title All protocol constants.
*/
library ConstantsLib {
// Deadline ratios, expressed as multiples of the category time frame.
From c7e66dfda477d99b862fbc8a4adca92d5783c5fc Mon Sep 17 00:00:00 2001
From: Zied <26070035+zguesmi@users.noreply.github.com>
Date: Thu, 3 Sep 2026 11:39:49 +0200
Subject: [PATCH 4/9] chore: add todo.md file
---
TODO.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 TODO.md
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 000000000..7ed377766
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,5 @@
+# TODO
+
+1. Move to the latest Solidity version
+2. Use a standard ERC-20 implementation for sRLC
+3. Drop the optimizer `details` block and use the default configuration
From 0298581f18b447963f74755dbccfddf678e4393f Mon Sep 17 00:00:00 2001
From: Zied <26070035+zguesmi@users.noreply.github.com>
Date: Thu, 3 Sep 2026 11:44:02 +0200
Subject: [PATCH 5/9] refactor: rename ConstantsLib to Constants and read it
directly
The library is renamed `Constants`, and `FacetBase` no longer aliases the
eight protocol constants. Every reader now names the declaration it uses:
the four facets and `CommonLib` reach `Constants.X` directly, and `FacetBase`
is left with the owner helpers alone.
The aliases were a compatibility layer that let the facets keep their bare
names. Removing them costs 48 qualified references but leaves a single path
to each constant, so a reader no longer has to check whether a bare name
comes from the base contract, the file itself or an inherited interface.
The public getters on `IexecPocoAccessorsFacet` keep their names and their
values, so the external surface is unchanged.
---
contracts/abstract/FacetBase.sol | 14 ----------
contracts/facets/IexecPoco1Facet.sol | 3 ++-
contracts/facets/IexecPoco2Facet.sol | 27 ++++++++++++-------
contracts/facets/IexecPocoAccessorsFacet.sol | 17 ++++++------
contracts/facets/IexecPocoBoostFacet.sol | 23 +++++++++-------
contracts/libs/CommonLib.sol | 4 +--
.../libs/{ConstantsLib.sol => Constants.sol} | 2 +-
docs/solidity/index.md | 13 +++------
8 files changed, 48 insertions(+), 55 deletions(-)
rename contracts/libs/{ConstantsLib.sol => Constants.sol} (98%)
diff --git a/contracts/abstract/FacetBase.sol b/contracts/abstract/FacetBase.sol
index 08f94c1cc..0cb63e4a1 100644
--- a/contracts/abstract/FacetBase.sol
+++ b/contracts/abstract/FacetBase.sol
@@ -3,7 +3,6 @@
pragma solidity ^0.8.0;
-import {ConstantsLib} from "../libs/ConstantsLib.sol";
import {PocoStorageLib} from "../libs/PocoStorageLib.sol";
import {IERC5313} from "@openzeppelin/contracts/interfaces/IERC5313.sol";
@@ -14,19 +13,6 @@ import {IERC5313} from "@openzeppelin/contracts/interfaces/IERC5313.sol";
* @dev Every facet must inherit from this contract.
*/
abstract contract FacetBase {
- // Aliases of the protocol constants, so that every facet inheriting this
- // contract keeps reading them under their bare names. {ConstantsLib} holds
- // the single declaration; solc folds each alias back to the same literal.
- uint256 internal constant CONTRIBUTION_DEADLINE_RATIO =
- ConstantsLib.CONTRIBUTION_DEADLINE_RATIO;
- uint256 internal constant REVEAL_DEADLINE_RATIO = ConstantsLib.REVEAL_DEADLINE_RATIO;
- uint256 internal constant FINAL_DEADLINE_RATIO = ConstantsLib.FINAL_DEADLINE_RATIO;
- uint256 internal constant WORKERPOOL_STAKE_RATIO = ConstantsLib.WORKERPOOL_STAKE_RATIO;
- uint256 internal constant KITTY_RATIO = ConstantsLib.KITTY_RATIO;
- uint256 internal constant KITTY_MIN = ConstantsLib.KITTY_MIN;
- address internal constant KITTY_ADDRESS = ConstantsLib.KITTY_ADDRESS;
- uint256 internal constant GROUPMEMBER_PURPOSE = ConstantsLib.GROUPMEMBER_PURPOSE;
-
modifier onlyOwner() {
require(_msgSender() == owner(), "Ownable: caller is not the owner");
_;
diff --git a/contracts/facets/IexecPoco1Facet.sol b/contracts/facets/IexecPoco1Facet.sol
index 87917a36e..440d86b65 100644
--- a/contracts/facets/IexecPoco1Facet.sol
+++ b/contracts/facets/IexecPoco1Facet.sol
@@ -14,6 +14,7 @@ import {IexecPoco1Errors} from "../interfaces/IexecPoco1Errors.sol";
import {FacetBase} from "../abstract/FacetBase.sol";
import {EscrowLib} from "../libs/EscrowLib.sol";
import {CommonLib} from "../libs/CommonLib.sol";
+import {Constants} from "../libs/Constants.sol";
struct Matching {
bytes32 apporderHash;
@@ -463,7 +464,7 @@ contract IexecPoco1Facet is IexecPoco1, IexecPoco1Errors, FacetBase {
//slither-disable-next-line divide-before-multiply
EscrowLib.lock(
deal.workerpool.owner,
- ((deal.workerpool.price * WORKERPOOL_STAKE_RATIO) / 100) * volume // ORDER IS IMPORTANT HERE!
+ ((deal.workerpool.price * Constants.WORKERPOOL_STAKE_RATIO) / 100) * volume // ORDER IS IMPORTANT HERE!
);
/**
diff --git a/contracts/facets/IexecPoco2Facet.sol b/contracts/facets/IexecPoco2Facet.sol
index 6071f99c3..06b713d95 100644
--- a/contracts/facets/IexecPoco2Facet.sol
+++ b/contracts/facets/IexecPoco2Facet.sol
@@ -12,6 +12,7 @@ import {IexecPoco2} from "../interfaces/IexecPoco2.sol";
import {FacetBase} from "../abstract/FacetBase.sol";
import {EscrowLib} from "../libs/EscrowLib.sol";
import {CommonLib} from "../libs/CommonLib.sol";
+import {Constants} from "../libs/Constants.sol";
contract IexecPoco2Facet is IexecPoco2, FacetBase {
modifier onlyScheduler(bytes32 _taskId) {
@@ -28,7 +29,7 @@ contract IexecPoco2Facet is IexecPoco2, FacetBase {
IexecLibCore_v5.Deal storage deal = $.m_deals[_dealid];
uint256 taskPrice = deal.app.price + deal.dataset.price + deal.workerpool.price;
- uint256 poolstake = (deal.workerpool.price * WORKERPOOL_STAKE_RATIO) / 100;
+ uint256 poolstake = (deal.workerpool.price * Constants.WORKERPOOL_STAKE_RATIO) / 100;
// Seize the payer of the task
EscrowLib.seize(deal.sponsor, taskPrice, _taskid);
@@ -45,11 +46,14 @@ contract IexecPoco2Facet is IexecPoco2, FacetBase {
// pool reward performed by consensus manager
// Retrieve part of the kitty
- uint256 kitty = $.m_frozens[KITTY_ADDRESS];
+ uint256 kitty = $.m_frozens[Constants.KITTY_ADDRESS];
if (kitty > 0) {
// Get a fraction of the kitty where KITTY_MIN <= fraction <= kitty
- kitty = Math.min(Math.max((kitty * KITTY_RATIO) / 100, KITTY_MIN), kitty);
- EscrowLib.seize(KITTY_ADDRESS, kitty, _taskid);
+ kitty = Math.min(
+ Math.max((kitty * Constants.KITTY_RATIO) / 100, Constants.KITTY_MIN),
+ kitty
+ );
+ EscrowLib.seize(Constants.KITTY_ADDRESS, kitty, _taskid);
EscrowLib.reward(deal.workerpool.owner, kitty, _taskid);
}
}
@@ -59,12 +63,12 @@ contract IexecPoco2Facet is IexecPoco2, FacetBase {
IexecLibCore_v5.Deal memory deal = $.m_deals[_dealid];
uint256 taskPrice = deal.app.price + deal.dataset.price + deal.workerpool.price;
- uint256 poolstake = (deal.workerpool.price * WORKERPOOL_STAKE_RATIO) / 100;
+ uint256 poolstake = (deal.workerpool.price * Constants.WORKERPOOL_STAKE_RATIO) / 100;
EscrowLib.unlock(deal.sponsor, taskPrice); // Refund the payer of the task
EscrowLib.seize(deal.workerpool.owner, poolstake, _taskid);
// Reward kitty and lock value on it.
- EscrowLib.rewardAndLock(KITTY_ADDRESS, poolstake, _taskid); // → Kitty / Burn
+ EscrowLib.rewardAndLock(Constants.KITTY_ADDRESS, poolstake, _taskid); // → Kitty / Burn
}
/***************************************************************************
@@ -85,8 +89,11 @@ contract IexecPoco2Facet is IexecPoco2, FacetBase {
task.dealid = _dealid;
task.idx = idx;
task.timeref = $.m_categories[deal.category].workClockTimeRef;
- task.contributionDeadline = deal.startTime + task.timeref * CONTRIBUTION_DEADLINE_RATIO;
- task.finalDeadline = deal.startTime + task.timeref * FINAL_DEADLINE_RATIO;
+ task.contributionDeadline =
+ deal.startTime +
+ task.timeref *
+ Constants.CONTRIBUTION_DEADLINE_RATIO;
+ task.finalDeadline = deal.startTime + task.timeref * Constants.FINAL_DEADLINE_RATIO;
// setup denominator
$.m_consensus[taskid].total = 1;
@@ -233,7 +240,7 @@ contract IexecPoco2Facet is IexecPoco2, FacetBase {
task.status = IexecLibCore_v5.TaskStatusEnum.COMPLETED;
task.consensusValue = contribution.resultHash;
- task.revealDeadline = block.timestamp + task.timeref * REVEAL_DEADLINE_RATIO;
+ task.revealDeadline = block.timestamp + task.timeref * Constants.REVEAL_DEADLINE_RATIO;
task.revealCounter = 1;
task.winnerCounter = 1;
task.resultDigest = _resultDigest;
@@ -400,7 +407,7 @@ contract IexecPoco2Facet is IexecPoco2, FacetBase {
// _msgSender() is a contributor: no need to check
task.status = IexecLibCore_v5.TaskStatusEnum.REVEALING;
task.consensusValue = _consensus;
- task.revealDeadline = block.timestamp + task.timeref * REVEAL_DEADLINE_RATIO;
+ task.revealDeadline = block.timestamp + task.timeref * Constants.REVEAL_DEADLINE_RATIO;
task.revealCounter = 0;
task.winnerCounter = winnerCounter;
diff --git a/contracts/facets/IexecPocoAccessorsFacet.sol b/contracts/facets/IexecPocoAccessorsFacet.sol
index f4c0bc5fc..d991ada2a 100644
--- a/contracts/facets/IexecPocoAccessorsFacet.sol
+++ b/contracts/facets/IexecPocoAccessorsFacet.sol
@@ -13,6 +13,7 @@ import {IexecPocoAccessors} from "../interfaces/IexecPocoAccessors.sol";
import {IRegistry} from "../registries/IRegistry.sol";
import {FacetBase} from "../abstract/FacetBase.sol";
import {CommonLib} from "../libs/CommonLib.sol";
+import {Constants} from "../libs/Constants.sol";
/**
* @title Getters contract for PoCo facets.
@@ -242,35 +243,35 @@ contract IexecPocoAccessorsFacet is IexecPocoAccessors, FacetBase {
// ========= Constants Accessors =========
function contribution_deadline_ratio() external pure returns (uint256) {
- return CONTRIBUTION_DEADLINE_RATIO;
+ return Constants.CONTRIBUTION_DEADLINE_RATIO;
}
function reveal_deadline_ratio() external pure returns (uint256) {
- return REVEAL_DEADLINE_RATIO;
+ return Constants.REVEAL_DEADLINE_RATIO;
}
function final_deadline_ratio() external pure returns (uint256) {
- return FINAL_DEADLINE_RATIO;
+ return Constants.FINAL_DEADLINE_RATIO;
}
function workerpool_stake_ratio() external pure returns (uint256) {
- return WORKERPOOL_STAKE_RATIO;
+ return Constants.WORKERPOOL_STAKE_RATIO;
}
function kitty_ratio() external pure returns (uint256) {
- return KITTY_RATIO;
+ return Constants.KITTY_RATIO;
}
function kitty_min() external pure returns (uint256) {
- return KITTY_MIN;
+ return Constants.KITTY_MIN;
}
function kitty_address() external pure returns (address) {
- return KITTY_ADDRESS;
+ return Constants.KITTY_ADDRESS;
}
function groupmember_purpose() external pure returns (uint256) {
- return GROUPMEMBER_PURPOSE;
+ return Constants.GROUPMEMBER_PURPOSE;
}
function eip712domain_separator() external view returns (bytes32) {
diff --git a/contracts/facets/IexecPocoBoostFacet.sol b/contracts/facets/IexecPocoBoostFacet.sol
index e43fa35be..e0234618c 100644
--- a/contracts/facets/IexecPocoBoostFacet.sol
+++ b/contracts/facets/IexecPocoBoostFacet.sol
@@ -18,6 +18,7 @@ import {FacetBase} from "../abstract/FacetBase.sol";
import {EscrowLib} from "../libs/EscrowLib.sol";
import {PocoStorageLib} from "../libs/PocoStorageLib.sol";
import {CommonLib} from "../libs/CommonLib.sol";
+import {Constants} from "../libs/Constants.sol";
//
// Not deployed yet!
@@ -300,7 +301,7 @@ contract IexecPocoBoostFacet is IexecPocoBoost, FacetBase {
deal.botFirst = requestOrderConsumed.toUint16();
deal.deadline = (block.timestamp +
$.m_categories[category].workClockTimeRef *
- CONTRIBUTION_DEADLINE_RATIO).toUint40();
+ Constants.CONTRIBUTION_DEADLINE_RATIO).toUint40();
deal.botSize = volume.toUint16();
/**
* Store right part of tag for later use.
@@ -342,7 +343,7 @@ contract IexecPocoBoostFacet is IexecPocoBoost, FacetBase {
//slither-disable-next-line divide-before-multiply
EscrowLib.lock(
workerpoolOwner,
- ((workerpoolPrice * WORKERPOOL_STAKE_RATIO) / 100) * volume
+ ((workerpoolPrice * Constants.WORKERPOOL_STAKE_RATIO) / 100) * volume
);
// Notify workerpool.
emit SchedulerNoticeBoost(
@@ -458,16 +459,20 @@ contract IexecPocoBoostFacet is IexecPocoBoost, FacetBase {
}
// Unlock scheduler stake
- EscrowLib.unlock(workerpoolOwner, (workerPoolPrice * WORKERPOOL_STAKE_RATIO) / 100);
+ EscrowLib.unlock(
+ workerpoolOwner,
+ (workerPoolPrice * Constants.WORKERPOOL_STAKE_RATIO) / 100
+ );
// Reward scheduler
- uint256 kitty = $.m_frozens[KITTY_ADDRESS];
+ uint256 kitty = $.m_frozens[Constants.KITTY_ADDRESS];
if (kitty > 0) {
- kitty = KITTY_MIN // 1. retrieve bare minimum from kitty
+ kitty = Constants
+ .KITTY_MIN // 1. retrieve bare minimum from kitty
.max( // 2. or eventually a fraction of kitty if bigger
// @dev As long as `KITTY_RATIO = 10`, we can introduce this small
- kitty / KITTY_RATIO // optimization for `kitty * KITTY_RATIO / 100`
+ kitty / Constants.KITTY_RATIO // optimization for `kitty * KITTY_RATIO / 100`
).min(kitty); // 3. but no more than available
- EscrowLib.seize(KITTY_ADDRESS, kitty, taskId);
+ EscrowLib.seize(Constants.KITTY_ADDRESS, kitty, taskId);
}
EscrowLib.reward(
workerpoolOwner,
@@ -515,13 +520,13 @@ contract IexecPocoBoostFacet is IexecPocoBoost, FacetBase {
task.status = IexecLibCore_v5.TaskStatusEnum.FAILED;
// Calculate workerpool price and task stake.
uint96 workerPoolPrice = deal.workerpoolPrice;
- uint256 workerpoolTaskStake = (workerPoolPrice * WORKERPOOL_STAKE_RATIO) / 100;
+ uint256 workerpoolTaskStake = (workerPoolPrice * Constants.WORKERPOOL_STAKE_RATIO) / 100;
// Refund the payer of the task by unlocking the locked funds.
EscrowLib.unlock(deal.sponsor, deal.appPrice + deal.datasetPrice + workerPoolPrice);
// Seize task stake from workerpool.
EscrowLib.seize(deal.workerpoolOwner, workerpoolTaskStake, taskId);
// Reward kitty and lock the rewarded amount.
- EscrowLib.rewardAndLock(KITTY_ADDRESS, workerpoolTaskStake, taskId);
+ EscrowLib.rewardAndLock(Constants.KITTY_ADDRESS, workerpoolTaskStake, taskId);
emit TaskClaimed(taskId);
}
diff --git a/contracts/libs/CommonLib.sol b/contracts/libs/CommonLib.sol
index 241d2da44..aa0deb522 100644
--- a/contracts/libs/CommonLib.sol
+++ b/contracts/libs/CommonLib.sol
@@ -8,7 +8,7 @@ import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {IERC734} from "../external/interfaces/IERC734.sol";
-import {ConstantsLib} from "./ConstantsLib.sol";
+import {Constants} from "./Constants.sol";
import {PocoStorageLib} from "./PocoStorageLib.sol";
/**
@@ -145,7 +145,7 @@ library CommonLib {
try
IERC734(restriction).keyHasPurpose( // ERC734 identity contract restriction
bytes32(uint256(uint160(account))),
- ConstantsLib.GROUPMEMBER_PURPOSE
+ Constants.GROUPMEMBER_PURPOSE
)
returns (bool success) {
return success;
diff --git a/contracts/libs/ConstantsLib.sol b/contracts/libs/Constants.sol
similarity index 98%
rename from contracts/libs/ConstantsLib.sol
rename to contracts/libs/Constants.sol
index c01e4a9f4..8edccc22d 100644
--- a/contracts/libs/ConstantsLib.sol
+++ b/contracts/libs/Constants.sol
@@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
/**
* @title All protocol constants.
*/
-library ConstantsLib {
+library Constants {
// Deadline ratios, expressed as multiples of the category time frame.
uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7;
uint256 internal constant REVEAL_DEADLINE_RATIO = 2;
diff --git a/docs/solidity/index.md b/docs/solidity/index.md
index 8a8fd2fa3..d22699b4d 100644
--- a/docs/solidity/index.md
+++ b/docs/solidity/index.md
@@ -5,7 +5,8 @@
A global interface that aggregates all the interfaces needed to interact with
the PoCo contracts.
-_Referenced in the SDK with the path `contracts/IexecInterface.sol`.
+_TODO Referenced in the SDK with the old path `contracts/IexecInterfaceToken.sol`.
+The SDK should be updated to use the new path `contracts/IexecInterface.sol`.
Changing the name or the path would cause a breaking change in the SDK._
## FacetBase
@@ -793,15 +794,7 @@ function broadcastWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrder _work
function broadcastRequestOrder(struct IexecLibOrders_v5.RequestOrder _requestorder) external
```
-## ConstantsLib
-
-The single declaration of every protocol constant. {FacetBase} aliases
-them so the facets keep reading them under their bare names.
-
-_They live in a library, not in a base contract, because a library cannot
-inherit and a contract constant is not readable from outside its own contract
-at any visibility. A library constant carries no such restriction, so both the
-facets and the helper libraries reach the same declaration._
+## Constants
## EscrowLib
From 4f2b8d32aaea6380ca00bfc9334d5c10cc51dea2 Mon Sep 17 00:00:00 2001
From: Zied <26070035+zguesmi@users.noreply.github.com>
Date: Thu, 3 Sep 2026 11:51:56 +0200
Subject: [PATCH 6/9] chore: restore migration script
---
scripts/upgrades/v6.2.0.ts | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/upgrades/v6.2.0.ts b/scripts/upgrades/v6.2.0.ts
index 06a0d631b..3b5b2aec1 100644
--- a/scripts/upgrades/v6.2.0.ts
+++ b/scripts/upgrades/v6.2.0.ts
@@ -6,7 +6,7 @@ import {
IexecCategoryManagerFacet__factory,
IexecConfigurationExtraFacet__factory,
IexecConfigurationFacet__factory,
- IexecEscrowFacet__factory,
+ IexecEscrowTokenFacet__factory,
IexecOrderManagementFacet__factory,
IexecPoco1Facet__factory,
IexecPoco2Facet__factory,
@@ -39,7 +39,7 @@ async function main() {
IexecConfigurationExtraFacet: '0x7Ff117E7385Ac3E207AF1791fE7e66C7802aeCCd',
IexecConfigurationFacet: '0x88eb05e62434057d3AA9e41FdaF7300A586b314D',
IexecERC20Facet: '0xB0152eC6f48E64a92B66D4736aFA1b02d8D45169', // Removed from codebase
- IexecEscrowFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
+ IexecEscrowTokenFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
IexecOrderManagementFacet: '0x541d532E6C195Ba044a75325F367342f523627fB',
IexecPoco1Facet: '0xC8dE3913fcdBC576970dCe24eE416CA25681f65f',
IexecPoco2Facet: '0x5c7B589E6807B554ed278f335215B93bCB692162',
@@ -53,7 +53,7 @@ async function main() {
IexecConfigurationExtraFacet: '0x7Ff117E7385Ac3E207AF1791fE7e66C7802aeCCd',
IexecConfigurationFacet: '0x88eb05e62434057d3AA9e41FdaF7300A586b314D',
IexecERC20Facet: '0xB0152eC6f48E64a92B66D4736aFA1b02d8D45169', // Removed from codebase
- IexecEscrowFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
+ IexecEscrowTokenFacet: '0xd9EB17A161581FBBAD2Ae998c0C19746EaAD0D6E',
IexecOrderManagementFacet: '0x541d532E6C195Ba044a75325F367342f523627fB',
IexecPoco1Facet: '0x5331c0FC7DD0Cc08047B546675cd1d6d47152AEb',
IexecPoco2Facet: '0x5c7B589E6807B554ed278f335215B93bCB692162',
@@ -96,8 +96,8 @@ async function main() {
factory: null,
},
{
- name: 'IexecEscrowFacet',
- address: addresses['IexecEscrowFacet'],
+ name: 'IexecEscrowTokenFacet',
+ address: addresses['IexecEscrowTokenFacet'],
factory: null,
},
{
@@ -150,9 +150,9 @@ async function main() {
factory: new IexecConfigurationFacet__factory(iexecLibOrders),
},
{
- name: 'IexecEscrowFacet',
+ name: 'IexecEscrowTokenFacet',
address: null,
- factory: new IexecEscrowFacet__factory(),
+ factory: new IexecEscrowTokenFacet__factory(),
},
{
name: 'IexecOrderManagementFacet',
From 9c3ed665f8042ded12dada14cbd6466380d56a5d Mon Sep 17 00:00:00 2001
From: Zied <26070035+zguesmi@users.noreply.github.com>
Date: Thu, 3 Sep 2026 11:52:52 +0200
Subject: [PATCH 7/9] chore: update diagrams
---
docs/uml/class-uml-IexecEscrows.svg | 628 ++++---
docs/uml/class-uml-IexecPocoBoostFacet.svg | 1331 +++++++--------
docs/uml/class-uml-IexecPocoFacets.svg | 1709 ++++++++++----------
docs/uml/class-uml-dir-libs.svg | 1341 +++++++--------
4 files changed, 2521 insertions(+), 2488 deletions(-)
diff --git a/docs/uml/class-uml-IexecEscrows.svg b/docs/uml/class-uml-IexecEscrows.svg
index b4a3e3a10..b97cb0531 100644
--- a/docs/uml/class-uml-IexecEscrows.svg
+++ b/docs/uml/class-uml-IexecEscrows.svg
@@ -4,99 +4,89 @@
-