From 161ddda8b4fbec8bb2167e86b9b038b71a47ab08 Mon Sep 17 00:00:00 2001 From: Zied <26070035+zguesmi@users.noreply.github.com> Date: Mon, 31 Aug 2026 12:34:06 +0200 Subject: [PATCH] refactor!: retire the `Token` suffix Native-asset mode is gone, so the `Token` suffix no longer distinguishes anything. - `IexecEscrowTokenFacet` becomes `IexecEscrowFacet` - the interface `IexecEscrowToken` becomes `IexecEscrow` - `IexecInterfaceToken` becomes `IexecInterface` The abstract contract that was named `IexecEscrow` becomes `IexecEscrowBase`, so the clean name goes to the interface. Interfaces are the published surface consumers compile against, and the repository already uses the `Base` suffix for shared abstracts (`FacetBase`). `IexecTokenSpender` keeps its name: it describes ERC-20 `receiveApproval` semantics, not a native/token distinction. The `IexecEscrow:` prefix of the `_transfer` revert reasons is left alone. Those strings are observable behavior; renaming a contract must not change them. BREAKING CHANGE: published ABI paths and artifact names change. - `abis/contracts/facets/IexecEscrowTokenFacet.json` becomes `abis/contracts/facets/IexecEscrowFacet.json` - `abis/contracts/IexecInterfaceToken.json` becomes `abis/contracts/IexecInterface.json` - `abis/contracts/interfaces/IexecEscrowToken.json` becomes `abis/contracts/interfaces/IexecEscrow.json` - `abis/contracts/abstract/IexecEscrow.json` becomes `abis/contracts/abstract/IexecEscrowBase.json` Function selectors are unaffected: a contract name is not part of a selector, so there is no protocol break. The ABI contents are byte-identical to the previous paths. The iExec SDK and the subgraph need advance notice, since the SDK references `contracts/IexecInterfaceToken.sol` by path. `deployments/{arbitrum,arbitrumSepolia}/IexecEscrowTokenFacet.json` is left in place: it records what is deployed. `hardhat-deploy` keys artifacts by contract name, so the next upgrade writes `IexecEscrowFacet.json` next to it and `removeDanglingFacetDeploymentArtifacts` deletes the stale one. The hand-maintained lists were updated: `getAllLocalFacetFunctions` in `utils/proxy-tools.ts` and the facet groups in `scripts/tools/sol-to-uml.mjs`. The historical upgrade reports under `scripts/upgrades/` keep the old names. Co-Authored-By: Claude Opus 5 --- ...nterfaceToken.json => IexecInterface.json} | 0 ...{IexecEscrow.json => IexecEscrowBase.json} | 0 ...wTokenFacet.json => IexecEscrowFacet.json} | 0 ...IexecEscrowToken.json => IexecEscrow.json} | 0 .../IexecInterface.json} | 0 .../IexecEscrowBase.json} | 0 .../IexecEscrowFacet.json} | 0 .../IexecEscrow.json} | 0 contracts/Diamond.sol | 4 +-- ...cInterfaceToken.sol => IexecInterface.sol} | 14 ++++---- .../{IexecEscrow.sol => IexecEscrowBase.sol} | 4 ++- ...rowTokenFacet.sol => IexecEscrowFacet.sol} | 10 +++--- contracts/facets/IexecPoco1Facet.sol | 6 ++-- contracts/facets/IexecPoco2Facet.sol | 4 +-- contracts/facets/IexecPocoBoostFacet.sol | 4 +-- .../{IexecEscrowToken.sol => IexecEscrow.sol} | 2 +- contracts/interfaces/IexecPocoBoost.sol | 2 +- .../interfaces/IexecPocoBoostAccessors.sol | 2 +- .../tools/testing/IexecEscrowTestContract.sol | 6 ++-- deploy/0_deploy.ts | 4 +-- docs/solidity/index.md | 18 ++++++---- docs/uml/class-uml-IexecEscrows.svg | 36 +++++++++---------- docs/uml/class-uml-IexecPocoBoostFacet.svg | 12 +++---- docs/uml/class-uml-IexecPocoFacets.svg | 12 +++---- 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 | 6 ++-- 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 ++--- ...ts => IexecEscrow-receiveApproval.test.ts} | 12 +++---- ...scrowToken.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 ++-- ...Escrow.test.ts => IexecEscrowBase.test.ts} | 2 +- .../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 +-- 57 files changed, 182 insertions(+), 195 deletions(-) rename abis/contracts/{IexecInterfaceToken.json => IexecInterface.json} (100%) rename abis/contracts/abstract/{IexecEscrow.json => IexecEscrowBase.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/abstract/{IexecEscrow.sol/IexecEscrow.json => IexecEscrowBase.sol/IexecEscrowBase.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} (82%) rename contracts/abstract/{IexecEscrow.sol => IexecEscrowBase.sol} (93%) rename contracts/facets/{IexecEscrowTokenFacet.sol => IexecEscrowFacet.sol} (98%) rename contracts/interfaces/{IexecEscrowToken.sol => IexecEscrow.sol} (93%) rename test/byContract/IexecEscrow/{IexecEscrowToken-receiveApproval.test.ts => IexecEscrow-receiveApproval.test.ts} (98%) rename test/byContract/IexecEscrow/{IexecEscrowToken.test.ts => IexecEscrow.test.ts} (98%) rename test/byContract/IexecPocoBoost/{IexecEscrow.test.ts => IexecEscrowBase.test.ts} (99%) 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/abstract/IexecEscrow.json b/abis/contracts/abstract/IexecEscrowBase.json similarity index 100% rename from abis/contracts/abstract/IexecEscrow.json rename to abis/contracts/abstract/IexecEscrowBase.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/abstract/IexecEscrow.sol/IexecEscrow.json b/abis/human-readable-abis/contracts/abstract/IexecEscrowBase.sol/IexecEscrowBase.json similarity index 100% rename from abis/human-readable-abis/contracts/abstract/IexecEscrow.sol/IexecEscrow.json rename to abis/human-readable-abis/contracts/abstract/IexecEscrowBase.sol/IexecEscrowBase.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 82% rename from contracts/IexecInterfaceToken.sol rename to contracts/IexecInterface.sol index d6fa8b3f0..eaae0ed4b 100644 --- a/contracts/IexecInterfaceToken.sol +++ b/contracts/IexecInterface.sol @@ -8,7 +8,7 @@ import {IexecCategoryManager} from "./interfaces/IexecCategoryManager.sol"; import {IexecConfiguration} from "./interfaces/IexecConfiguration.sol"; import {IexecConfigurationExtra} from "./interfaces/IexecConfigurationExtra.sol"; import {IexecERC20} from "./interfaces/IexecERC20.sol"; -import {IexecEscrowToken} from "./interfaces/IexecEscrowToken.sol"; +import {IexecEscrow} from "./interfaces/IexecEscrow.sol"; import {IexecOrderManagement} from "./interfaces/IexecOrderManagement.sol"; import {IexecPoco1} from "./interfaces/IexecPoco1.sol"; import {IexecPoco1Errors} from "./interfaces/IexecPoco1Errors.sol"; @@ -20,23 +20,23 @@ 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`. - * Changing the name or the path would cause a breaking change in the SDK. + * the PoCo contracts. + * @dev Referenced in the SDK. The previous path and name, + * `contracts/IexecInterfaceToken.sol` and `IexecInterfaceToken`, were retired + * with native mode; the SDK must be updated to this path and name. */ // 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 +interface IexecInterface is IexecAccessorsABILegacy, IexecCategoryManager, IexecConfiguration, IexecConfigurationExtra, IexecERC20, - IexecEscrowToken, + IexecEscrow, IexecOrderManagement, IexecPoco1, IexecPoco1Errors, diff --git a/contracts/abstract/IexecEscrow.sol b/contracts/abstract/IexecEscrowBase.sol similarity index 93% rename from contracts/abstract/IexecEscrow.sol rename to contracts/abstract/IexecEscrowBase.sol index b6ee02ba7..2a3a5a4ea 100644 --- a/contracts/abstract/IexecEscrow.sol +++ b/contracts/abstract/IexecEscrowBase.sol @@ -9,8 +9,10 @@ import {FacetBase} from "./FacetBase.sol"; /** * @title Manage (lock/unlock/reward/seize) user funds. + * @dev The revert reasons of `_transfer` keep the `IexecEscrow:` prefix on + * purpose: they are observable behavior that callers already depend on. */ -abstract contract IexecEscrow is FacetBase, IexecERC20Events, IexecEscrowEvents { +abstract contract IexecEscrowBase is FacetBase, IexecERC20Events, IexecEscrowEvents { /** * Lock some value of an account. * @param account The account where the value should be locked. 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 23a096943..87090a928 100644 --- a/contracts/facets/IexecEscrowTokenFacet.sol +++ b/contracts/facets/IexecEscrowFacet.sol @@ -4,20 +4,20 @@ pragma solidity ^0.8.0; import {FacetBase} from "../abstract/FacetBase.sol"; -import {IexecEscrow} from "../abstract/IexecEscrow.sol"; +import {IexecEscrowBase} from "../abstract/IexecEscrowBase.sol"; import {IexecERC20} from "../interfaces/IexecERC20.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"; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; -contract IexecEscrowTokenFacet is +contract IexecEscrowFacet is FacetBase, IexecERC20, IexecTokenSpender, - IexecEscrowToken, - IexecEscrow + IexecEscrow, + IexecEscrowBase { /*************************************************************************** * Escrow methods: public * diff --git a/contracts/facets/IexecPoco1Facet.sol b/contracts/facets/IexecPoco1Facet.sol index 79fb4c44c..33517def6 100644 --- a/contracts/facets/IexecPoco1Facet.sol +++ b/contracts/facets/IexecPoco1Facet.sol @@ -12,7 +12,7 @@ import {FacetBase} from "../abstract/FacetBase.sol"; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; import {IexecPoco1} from "../interfaces/IexecPoco1.sol"; import {IexecPoco1Errors} from "../interfaces/IexecPoco1Errors.sol"; -import {IexecEscrow} from "../abstract/IexecEscrow.sol"; +import {IexecEscrowBase} from "../abstract/IexecEscrowBase.sol"; import {IexecPocoCommon} from "../abstract/IexecPocoCommon.sol"; import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; @@ -31,7 +31,7 @@ contract IexecPoco1Facet is IexecPoco1, IexecPoco1Errors, FacetBase, - IexecEscrow, + IexecEscrowBase, SignatureVerifier, IexecPocoCommon { @@ -149,7 +149,7 @@ contract IexecPoco1Facet is * @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/facets/IexecPoco2Facet.sol b/contracts/facets/IexecPoco2Facet.sol index 79d8987e0..bd05c2d91 100644 --- a/contracts/facets/IexecPoco2Facet.sol +++ b/contracts/facets/IexecPoco2Facet.sol @@ -10,10 +10,10 @@ import {IexecLibCore_v5} from "../libs/IexecLibCore_v5.sol"; import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; import {FacetBase} from "../abstract/FacetBase.sol"; import {IexecPoco2} from "../interfaces/IexecPoco2.sol"; -import {IexecEscrow} from "../abstract/IexecEscrow.sol"; +import {IexecEscrowBase} from "../abstract/IexecEscrowBase.sol"; import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; -contract IexecPoco2Facet is IexecPoco2, FacetBase, IexecEscrow, SignatureVerifier { +contract IexecPoco2Facet is IexecPoco2, FacetBase, IexecEscrowBase, SignatureVerifier { modifier onlyScheduler(bytes32 _taskId) { PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); require(_msgSender() == $.m_deals[$.m_tasks[_taskId].dealid].workerpool.owner); diff --git a/contracts/facets/IexecPocoBoostFacet.sol b/contracts/facets/IexecPocoBoostFacet.sol index 86fce216d..25180c3f7 100644 --- a/contracts/facets/IexecPocoBoostFacet.sol +++ b/contracts/facets/IexecPocoBoostFacet.sol @@ -15,7 +15,7 @@ import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; import {IWorkerpool} from "../registries/workerpools/IWorkerpool.v8.sol"; import {FacetBase} from "../abstract/FacetBase.sol"; import {IexecPocoBoost} from "../interfaces/IexecPocoBoost.sol"; -import {IexecEscrow} from "../abstract/IexecEscrow.sol"; +import {IexecEscrowBase} from "../abstract/IexecEscrowBase.sol"; import {IexecPocoCommon} from "../abstract/IexecPocoCommon.sol"; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; @@ -31,7 +31,7 @@ import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; contract IexecPocoBoostFacet is IexecPocoBoost, FacetBase, - IexecEscrow, + IexecEscrowBase, SignatureVerifier, IexecPocoCommon { diff --git a/contracts/interfaces/IexecEscrowToken.sol b/contracts/interfaces/IexecEscrow.sol similarity index 93% rename from contracts/interfaces/IexecEscrowToken.sol rename to contracts/interfaces/IexecEscrow.sol index 9096d8cb7..246c7c1d2 100644 --- a/contracts/interfaces/IexecEscrowToken.sol +++ b/contracts/interfaces/IexecEscrow.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; import {IexecEscrowEvents} from "./IexecEscrowEvents.sol"; -interface IexecEscrowToken is IexecEscrowEvents { +interface IexecEscrow is IexecEscrowEvents { 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/tools/testing/IexecEscrowTestContract.sol b/contracts/tools/testing/IexecEscrowTestContract.sol index 4d20a5a34..b169bce35 100644 --- a/contracts/tools/testing/IexecEscrowTestContract.sol +++ b/contracts/tools/testing/IexecEscrowTestContract.sol @@ -3,14 +3,14 @@ pragma solidity ^0.8.0; -import {IexecEscrow} from "../../abstract/IexecEscrow.sol"; +import {IexecEscrowBase} from "../../abstract/IexecEscrowBase.sol"; import {PocoStorageLib} from "../../libs/PocoStorageLib.sol"; /** * @notice a wrapper contract to make internal functions of - * IexecEscrow testable. + * IexecEscrowBase testable. */ -contract IexecEscrowTestContract is IexecEscrow { +contract IexecEscrowTestContract is IexecEscrowBase { function lock_(address account, uint256 value) external { lock(account, value); } 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 c25b608db..326eaf910 100644 --- a/docs/solidity/index.md +++ b/docs/solidity/index.md @@ -1,18 +1,22 @@ # 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`. -Changing the name or the path would cause a breaking change in the SDK._ +_Referenced in the SDK. The previous path and name, +`contracts/IexecInterfaceToken.sol` and `IexecInterfaceToken`, were retired +with native mode; the SDK must be updated to this path and name._ ## FacetBase _Every facet must inherit from this contract._ -## IexecEscrow +## IexecEscrowBase + +_The revert reasons of `_transfer` keep the `IexecEscrow:` prefix on +purpose: they are observable behavior that callers already depend on._ ## IexecCategoryManagerFacet @@ -70,7 +74,7 @@ function setTeeBroker(address _teebroker) external function setCallbackGas(uint256 _callbackgas) external ``` -## IexecEscrowTokenFacet +## IexecEscrowFacet ### receive @@ -296,7 +300,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 e587e43ea..ae5b63dff 100644 --- a/docs/uml/class-uml-IexecEscrows.svg +++ b/docs/uml/class-uml-IexecEscrows.svg @@ -38,8 +38,8 @@ 4 <<Abstract>> -IexecEscrow -contracts/abstract/IexecEscrow.sol +IexecEscrowBase +contracts/abstract/IexecEscrowBase.sol Internal:    lock(account: address, value: uint256) @@ -71,9 +71,9 @@ - - -27 + + +28 <<Interface>> IexecEscrowEvents @@ -85,9 +85,9 @@    <<event>> Reward(owner: address, amount: uint256, ref: bytes32)    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) - + -4->27 +4->28 @@ -155,8 +155,8 @@ 11 -IexecEscrowTokenFacet -contracts/facets/IexecEscrowTokenFacet.sol +IexecEscrowFacet +contracts/facets/IexecEscrowFacet.sol Internal:    _executeOperation(sender: address, data: bytes) @@ -219,13 +219,13 @@ - - -28 + + +27 <<Interface>> -IexecEscrowToken -contracts/interfaces/IexecEscrowToken.sol +IexecEscrow +contracts/interfaces/IexecEscrow.sol External:     null() @@ -237,9 +237,9 @@     withdrawTo(uint256, address): bool     recover(): uint256 - + -11->28 +11->27 @@ -340,9 +340,9 @@ - + -28->27 +27->28 diff --git a/docs/uml/class-uml-IexecPocoBoostFacet.svg b/docs/uml/class-uml-IexecPocoBoostFacet.svg index 23dcc4013..0235d8c54 100644 --- a/docs/uml/class-uml-IexecPocoBoostFacet.svg +++ b/docs/uml/class-uml-IexecPocoBoostFacet.svg @@ -38,8 +38,8 @@ 4 <<Abstract>> -IexecEscrow -contracts/abstract/IexecEscrow.sol +IexecEscrowBase +contracts/abstract/IexecEscrowBase.sol Internal:    lock(account: address, value: uint256) @@ -71,9 +71,9 @@ - + -27 +28 <<Interface>> IexecEscrowEvents @@ -85,9 +85,9 @@    <<event>> Reward(owner: address, amount: uint256, ref: bytes32)    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) - + -4->27 +4->28 diff --git a/docs/uml/class-uml-IexecPocoFacets.svg b/docs/uml/class-uml-IexecPocoFacets.svg index 0fb435d87..a3459bf3e 100644 --- a/docs/uml/class-uml-IexecPocoFacets.svg +++ b/docs/uml/class-uml-IexecPocoFacets.svg @@ -38,8 +38,8 @@ 4 <<Abstract>> -IexecEscrow -contracts/abstract/IexecEscrow.sol +IexecEscrowBase +contracts/abstract/IexecEscrowBase.sol Internal:    lock(account: address, value: uint256) @@ -71,9 +71,9 @@ - + -27 +28 <<Interface>> IexecEscrowEvents @@ -85,9 +85,9 @@    <<event>> Reward(owner: address, amount: uint256, ref: bytes32)    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) - + -4->27 +4->28 diff --git a/docs/uml/class-uml-dir-facets.svg b/docs/uml/class-uml-dir-facets.svg index 0809a3dd8..6ec63ee7e 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 bbf1fe69f..6ba99b2d3 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', 'IexecEscrow'], 'IexecEscrows'); +await generateClassDiagramOfContracts(['IexecEscrowFacet', 'IexecEscrowBase'], 'IexecEscrows'); await generateClassDiagramOfContracts(['IexecPocoBoostFacet'], 'IexecPocoBoostFacet'); diff --git a/scripts/upgrades/v6.2.0.ts b/scripts/upgrades/v6.2.0.ts index 3b5b2aec1..073460a4c 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, @@ -150,9 +150,11 @@ async function main() { factory: new IexecConfigurationFacet__factory(iexecLibOrders), }, { + // Deployment name kept as it was recorded on-chain. The contract has + // since been renamed to `IexecEscrowFacet`. name: 'IexecEscrowTokenFacet', 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 7c781b057..cd5dfa48e 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 c48eb1aa3..00f8fa163 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 f7bf57223..fb7057011 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 83a2690da..c0f83299d 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 b9e5600d4..1269e1a70 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/IexecEscrow.test.ts b/test/byContract/IexecPocoBoost/IexecEscrowBase.test.ts similarity index 99% rename from test/byContract/IexecPocoBoost/IexecEscrow.test.ts rename to test/byContract/IexecPocoBoost/IexecEscrowBase.test.ts index 7a38a6888..2932c83f8 100644 --- a/test/byContract/IexecPocoBoost/IexecEscrow.test.ts +++ b/test/byContract/IexecPocoBoost/IexecEscrowBase.test.ts @@ -16,7 +16,7 @@ let iexecEscrow: IexecEscrowTestContract; let iexecEscrowAddress: string; let account: SignerWithAddress; -describe('IexecEscrow', function () { +describe('IexecEscrowBase', function () { beforeEach('Deploy', async () => { // Initialize test environment await loadFixture(initFixture); diff --git a/test/byContract/IexecPocoBoost/IexecPocoBoost.test.ts b/test/byContract/IexecPocoBoost/IexecPocoBoost.test.ts index 6d798850a..f9fa6a5e6 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 597684f99..71e0d718f 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(),