From a6775e4fc2101912faf3abd471bc30ae125a5847 Mon Sep 17 00:00:00 2001 From: Zied <26070035+zguesmi@users.noreply.github.com> Date: Mon, 31 Aug 2026 11:27:13 +0200 Subject: [PATCH 1/4] chore: remove dev token chain --- hardhat.config.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 716b5a7d..da827a4e 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -118,18 +118,6 @@ const config: HardhatUserConfig = { ...arbitrumBaseConfig, }), }, - // TODO rename to dev - 'dev-token': { - chainId: 65535, - url: process.env.DEV_NODE || 'http://localhost:8545', - accounts: { - mnemonic: process.env.MNEMONIC || '', - }, - // When deploying on a blockchain with EIP-1559 enabled and - // force-sealing disabled, deployment gets stuck if gasPrice is - // not manually set. Other approaches might be considered here. - gasPrice: 8_000_000_000, // 8 Gwei - }, arbitrum: { url: process.env.ARBITRUM_RPC_URL || // Used in local development From 64e46d3fba8a1d0d5874a6f2bbb723d4c81bc1a6 Mon Sep 17 00:00:00 2001 From: Zied <26070035+zguesmi@users.noreply.github.com> Date: Mon, 31 Aug 2026 11:28:12 +0200 Subject: [PATCH 2/4] chore: update uml diagrams and clean --- contracts/abstract/IexecERC20Base.sol | 2 +- docs/uml/class-uml-dir-registries.svg | 311 +++++++++--------- .../IexecPocoAccessors.test.ts | 1 - 3 files changed, 155 insertions(+), 159 deletions(-) diff --git a/contracts/abstract/IexecERC20Base.sol b/contracts/abstract/IexecERC20Base.sol index b57d849a..6ca5fcc7 100644 --- a/contracts/abstract/IexecERC20Base.sol +++ b/contracts/abstract/IexecERC20Base.sol @@ -8,7 +8,7 @@ import {IexecERC20} from "../interfaces/IexecERC20.sol"; import {IexecTokenSpender} from "../interfaces/IexecTokenSpender.sol"; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; -// TODO: Merge this abstract contract with IexecEscrowTokenFacet after removing IexecEscrowNativeFacet. +// TODO: Merge this abstract contract with IexecEscrowTokenFacet, now its only implementer. abstract contract IexecERC20Base is IexecERC20, FacetBase { function transfer(address recipient, uint256 amount) external override returns (bool) { _transfer(_msgSender(), recipient, amount); diff --git a/docs/uml/class-uml-dir-registries.svg b/docs/uml/class-uml-dir-registries.svg index cb182f54..725c4d48 100644 --- a/docs/uml/class-uml-dir-registries.svg +++ b/docs/uml/class-uml-dir-registries.svg @@ -4,49 +4,48 @@ - - + + UmlClassDiagram - + 0 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool 1 - -<<Abstract>> -Registry -contracts/registries/Registry.sol - -Private: -   _baseUri: string -Public: -   master: address -   proxyCode: bytes -   proxyCodeHash: bytes32 -   previous: IRegistry -   initialized: bool - -Internal: -    _checkOwner() -    _mintCreate(_owner: address, _args: bytes): address -    _mintPredict(_owner: address, _args: bytes): address -    _baseURI(): string -External: -    initialize(_previous: address) <<onlyOwner>> -    setBaseURI(baseUri: string) <<onlyOwner>> -    isRegistered(_entry: address): bool -    setName(address, string) <<onlyOwner>> + +<<Abstract>> +Registry +contracts/registries/Registry.sol + +Private: +   _baseUri: string +Public: +   master: address +   proxyCode: bytes +   proxyCodeHash: bytes32 +   previous: IRegistry +   initialized: bool + +Internal: +    _checkOwner() +    _mintCreate(_owner: address, _args: bytes): address +    _mintPredict(_owner: address, _args: bytes): address +    _baseURI(): string +External: +    initialize(_previous: address) <<onlyOwner>> +    setBaseURI(baseUri: string) <<onlyOwner>> +    isRegistered(_entry: address): bool Public:    constructor(_master: address, _name: string, _symbol: string)    baseURI(): string @@ -54,72 +53,70 @@ 1->0 - - + + 11 - -InitializableUpgradeabilityProxy -contracts/registries/proxy/InitializableUpgradeabilityProxy.sol - -Public: -    <<payable>> initialize(_logic: address, _data: bytes) + +InitializableUpgradeabilityProxy +contracts/registries/proxy/InitializableUpgradeabilityProxy.sol + +Public: +    <<payable>> initialize(_logic: address, _data: bytes) 1->11 - - + + 2 - -<<Abstract>> -RegistryEntry -contracts/registries/RegistryEntry.sol - -Public: -   registry: IRegistry - -Internal: -    _initialize(_registry: address) -External: -    setName(address, string) <<onlyOwner>> -Public: -    <<modifier>> onlyOwner() -    owner(): address + +<<Abstract>> +RegistryEntry +contracts/registries/RegistryEntry.sol + +Public: +   registry: IRegistry + +Internal: +    _initialize(_registry: address) +Public: +    <<modifier>> onlyOwner() +    owner(): address 2->0 - - + + 3 - -App -contracts/registries/apps/App.sol - -Public: -   m_appName: string -   m_appType: string -   m_appMultiaddr: bytes -   m_appChecksum: bytes32 -   m_appMREnclave: bytes - -Public: -    initialize(_appName: string, _appType: string, _appMultiaddr: bytes, _appChecksum: bytes32, _appMREnclave: bytes) + +App +contracts/registries/apps/App.sol + +Public: +   m_appName: string +   m_appType: string +   m_appMultiaddr: bytes +   m_appChecksum: bytes32 +   m_appMREnclave: bytes + +Public: +    initialize(_appName: string, _appType: string, _appMultiaddr: bytes, _appChecksum: bytes32, _appMREnclave: bytes) 3->2 - - + + @@ -139,14 +136,14 @@ 4->1 - - + + 4->3 - - + + @@ -167,23 +164,23 @@ 6 - -Dataset -contracts/registries/datasets/Dataset.sol - -Public: -   m_datasetName: string -   m_datasetMultiaddr: bytes -   m_datasetChecksum: bytes32 - -Public: -    initialize(_datasetName: string, _datasetMultiaddr: bytes, _datasetChecksum: bytes32) + +Dataset +contracts/registries/datasets/Dataset.sol + +Public: +   m_datasetName: string +   m_datasetMultiaddr: bytes +   m_datasetChecksum: bytes32 + +Public: +    initialize(_datasetName: string, _datasetMultiaddr: bytes, _datasetChecksum: bytes32) 6->2 - - + + @@ -203,14 +200,14 @@ 7->1 - - + + 7->6 - - + + @@ -229,65 +226,65 @@ 9 - -<<Library>> -Address -contracts/registries/proxy/Address.sol - -Internal: -    isContract(account: address): bool + +<<Library>> +Address +contracts/registries/proxy/Address.sol + +Internal: +    isContract(account: address): bool 10 - -BaseUpgradeabilityProxy -contracts/registries/proxy/BaseUpgradeabilityProxy.sol - -Internal: -   IMPLEMENTATION_SLOT: bytes32 - -Internal: -    _implementation(): (impl: address) -    _upgradeTo(newImplementation: address) -    _setImplementation(newImplementation: address) -Public: -    <<event>> Upgraded(implementation: address) + +BaseUpgradeabilityProxy +contracts/registries/proxy/BaseUpgradeabilityProxy.sol + +Internal: +   IMPLEMENTATION_SLOT: bytes32 + +Internal: +    _implementation(): (impl: address) +    _upgradeTo(newImplementation: address) +    _setImplementation(newImplementation: address) +Public: +    <<event>> Upgraded(implementation: address) 10->9 - - + + 12 - -<<Abstract>> -Proxy -contracts/registries/proxy/Proxy.sol - -Internal: -    <<abstract>> _implementation(): (impl: address) -    _delegate(implementation: address) -    _willFallback() -    _fallback() -External: -    <<payable>> null() -    <<payable>> null() + +<<Abstract>> +Proxy +contracts/registries/proxy/Proxy.sol + +Internal: +    <<abstract>> _implementation(): (impl: address) +    _delegate(implementation: address) +    _willFallback() +    _fallback() +External: +    <<payable>> null() +    <<payable>> null() 10->12 - - + + 11->10 - - + + @@ -306,26 +303,26 @@ 14 - -Workerpool -contracts/registries/workerpools/Workerpool.sol - -Public: -   m_workerpoolDescription: string -   m_workerStakeRatioPolicy: uint256 -   m_schedulerRewardRatioPolicy: uint256 - -External: -    changePolicy(_newWorkerStakeRatioPolicy: uint256, _newSchedulerRewardRatioPolicy: uint256) <<onlyOwner>> -Public: -    <<event>> PolicyUpdate(oldWorkerStakeRatioPolicy: uint256, newWorkerStakeRatioPolicy: uint256, oldSchedulerRewardRatioPolicy: uint256, newSchedulerRewardRatioPolicy: uint256) -    initialize(_workerpoolDescription: string) + +Workerpool +contracts/registries/workerpools/Workerpool.sol + +Public: +   m_workerpoolDescription: string +   m_workerStakeRatioPolicy: uint256 +   m_schedulerRewardRatioPolicy: uint256 + +External: +    changePolicy(_newWorkerStakeRatioPolicy: uint256, _newSchedulerRewardRatioPolicy: uint256) <<onlyOwner>> +Public: +    <<event>> PolicyUpdate(oldWorkerStakeRatioPolicy: uint256, newWorkerStakeRatioPolicy: uint256, oldSchedulerRewardRatioPolicy: uint256, newSchedulerRewardRatioPolicy: uint256) +    initialize(_workerpoolDescription: string) 14->2 - - + + @@ -345,14 +342,14 @@ 15->1 - - + + 15->14 - - + + diff --git a/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts b/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts index 4f7cc534..b132006f 100644 --- a/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts +++ b/test/byContract/iexecPocoAccessors/IexecPocoAccessors.test.ts @@ -131,7 +131,6 @@ describe('IexecPocoAccessors', async () => { expect(account.locked).to.equal(dealPrice); }); - // TODO test the case where token() == 0x0 in native mode. it('token', async function () { expect(await iexecPoco.token()).to.equal((await deployments.get('RLC')).address); }); From 8e3fa58392b492fec6c5c3d3360bff681535192a Mon Sep 17 00:00:00 2001 From: Zied <26070035+zguesmi@users.noreply.github.com> Date: Mon, 31 Aug 2026 11:48:00 +0200 Subject: [PATCH 3/4] refactor: merge IexecERC20Base and IexecEscrowTokenFacet --- abis/contracts/abstract/IexecERC20Base.json | 294 ---- .../IexecERC20Base.sol/IexecERC20Base.json | 14 - contracts/abstract/IexecERC20Base.sol | 130 -- contracts/facets/IexecEscrowTokenFacet.sol | 127 +- docs/solidity/index.md | 74 +- docs/uml/class-uml-IexecEscrows.svg | 1249 ++++++++--------- docs/uml/class-uml-IexecPocoBoostFacet.svg | 380 ++--- docs/uml/class-uml-IexecPocoFacets.svg | 472 +++---- docs/uml/class-uml-dir-facets.svg | 49 +- 9 files changed, 1224 insertions(+), 1565 deletions(-) delete mode 100644 abis/contracts/abstract/IexecERC20Base.json delete mode 100644 abis/human-readable-abis/contracts/abstract/IexecERC20Base.sol/IexecERC20Base.json delete mode 100644 contracts/abstract/IexecERC20Base.sol diff --git a/abis/contracts/abstract/IexecERC20Base.json b/abis/contracts/abstract/IexecERC20Base.json deleted file mode 100644 index 6a5c033f..00000000 --- a/abis/contracts/abstract/IexecERC20Base.json +++ /dev/null @@ -1,294 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/abis/human-readable-abis/contracts/abstract/IexecERC20Base.sol/IexecERC20Base.json b/abis/human-readable-abis/contracts/abstract/IexecERC20Base.sol/IexecERC20Base.json deleted file mode 100644 index a6b4632d..00000000 --- a/abis/human-readable-abis/contracts/abstract/IexecERC20Base.sol/IexecERC20Base.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - "event Approval(address indexed,address indexed,uint256)", - "event Lock(address,uint256)", - "event Reward(address,uint256,bytes32)", - "event Seize(address,uint256,bytes32)", - "event Transfer(address indexed,address indexed,uint256)", - "event Unlock(address,uint256)", - "function approve(address,uint256) returns (bool)", - "function approveAndCall(address,uint256,bytes) returns (bool)", - "function decreaseAllowance(address,uint256) returns (bool)", - "function increaseAllowance(address,uint256) returns (bool)", - "function transfer(address,uint256) returns (bool)", - "function transferFrom(address,address,uint256) returns (bool)" -] diff --git a/contracts/abstract/IexecERC20Base.sol b/contracts/abstract/IexecERC20Base.sol deleted file mode 100644 index 6ca5fcc7..00000000 --- a/contracts/abstract/IexecERC20Base.sol +++ /dev/null @@ -1,130 +0,0 @@ -// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity ^0.8.0; - -import {FacetBase} from "./FacetBase.sol"; -import {IexecERC20} from "../interfaces/IexecERC20.sol"; -import {IexecTokenSpender} from "../interfaces/IexecTokenSpender.sol"; -import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; - -// TODO: Merge this abstract contract with IexecEscrowTokenFacet, now its only implementer. -abstract contract IexecERC20Base is IexecERC20, FacetBase { - function transfer(address recipient, uint256 amount) external override returns (bool) { - _transfer(_msgSender(), recipient, amount); - return true; - } - - function approve(address spender, uint256 value) external override returns (bool) { - _approve(_msgSender(), spender, value); - return true; - } - - function approveAndCall( - address spender, - uint256 value, - bytes calldata extraData - ) external override returns (bool) { - _approve(_msgSender(), spender, value); - require( - IexecTokenSpender(spender).receiveApproval( - _msgSender(), - value, - address(this), - extraData - ), - "approval-refused" - ); - return true; - } - - function transferFrom( - address sender, - address recipient, - uint256 amount - ) external override returns (bool) { - PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); - _transfer(sender, recipient, amount); - // TEMPORARY MIGRATION FIX: Check allowance to prevent underflow and revert without reason for backward compatibility - // TODO: Remove this in the next major version - uint256 currentAllowance = $.m_allowances[sender][_msgSender()]; - if (currentAllowance < amount) { - revert(); - } - _approve(sender, _msgSender(), currentAllowance - amount); - return true; - } - - function increaseAllowance( - address spender, - uint256 addedValue - ) external override returns (bool) { - PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); - _approve(_msgSender(), spender, $.m_allowances[_msgSender()][spender] + addedValue); - return true; - } - - function decreaseAllowance( - address spender, - uint256 subtractedValue - ) external override returns (bool) { - PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); - // TEMPORARY MIGRATION FIX: Check allowance to prevent underflow and revert without reason for backward compatibility - // TODO: Remove this in the next major version - uint256 currentAllowance = $.m_allowances[_msgSender()][spender]; - if (currentAllowance < subtractedValue) { - revert(); - } - _approve(_msgSender(), spender, currentAllowance - subtractedValue); - return true; - } - - function _transferUnchecked(address sender, address recipient, uint256 amount) internal { - require(sender != address(0), "ERC20: transfer from the zero address"); - require(recipient != address(0), "ERC20: transfer to the zero address"); - PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); - uint256 senderBalance = $.m_balances[sender]; - // TEMPORARY MIGRATION FIX: Check balance to prevent underflow and revert without reason for backward compatibility - // TODO: Remove this in the next major version - if (senderBalance < amount) { - revert(); - } - $.m_balances[sender] = senderBalance - amount; - $.m_balances[recipient] = $.m_balances[recipient] + amount; - emit Transfer(sender, recipient, amount); - } - - function _transfer(address sender, address recipient, uint256 amount) internal { - _transferUnchecked(sender, recipient, amount); - } - - function _mint(address account, uint256 amount) internal { - require(account != address(0), "ERC20: mint to the zero address"); - PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); - $.m_totalSupply = $.m_totalSupply + amount; - $.m_balances[account] = $.m_balances[account] + amount; - emit Transfer(address(0), account, amount); - } - - function _burn(address account, uint256 amount) internal { - require(account != address(0), "ERC20: burn from the zero address"); - PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); - uint256 accountBalance = $.m_balances[account]; - // TEMPORARY MIGRATION FIX: Check balance to prevent underflow and revert without reason for backward compatibility - // TODO: Remove this in the next major version - if (accountBalance < amount) { - revert(); - } - $.m_totalSupply = $.m_totalSupply - amount; - $.m_balances[account] = accountBalance - amount; - emit Transfer(account, address(0), amount); - } - - function _approve(address owner, address spender, uint256 amount) internal { - require(owner != address(0), "ERC20: approve from the zero address"); - require(spender != address(0), "ERC20: approve to the zero address"); - PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); - $.m_allowances[owner][spender] = amount; - emit Approval(owner, spender, amount); - } -} diff --git a/contracts/facets/IexecEscrowTokenFacet.sol b/contracts/facets/IexecEscrowTokenFacet.sol index f53eeb19..802ceea5 100644 --- a/contracts/facets/IexecEscrowTokenFacet.sol +++ b/contracts/facets/IexecEscrowTokenFacet.sol @@ -3,14 +3,15 @@ pragma solidity ^0.8.0; -import {IexecERC20Base} from "../abstract/IexecERC20Base.sol"; +import {FacetBase} from "../abstract/FacetBase.sol"; +import {IexecERC20} from "../interfaces/IexecERC20.sol"; import {IexecEscrowToken} from "../interfaces/IexecEscrowToken.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 IexecEscrowToken, IexecTokenSpender, IexecERC20Base { +contract IexecEscrowTokenFacet is IexecEscrowToken, IexecTokenSpender, IexecERC20, FacetBase { /*************************************************************************** * Escrow methods: public * ***************************************************************************/ @@ -197,4 +198,126 @@ contract IexecEscrowTokenFacet is IexecEscrowToken, IexecTokenSpender, IexecERC2 PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); $.m_baseToken.transfer(to, amount); } + + /*************************************************************************** + * ERC20 methods * + ***************************************************************************/ + + function transfer(address recipient, uint256 amount) external override returns (bool) { + _transfer(_msgSender(), recipient, amount); + return true; + } + + function approve(address spender, uint256 value) external override returns (bool) { + _approve(_msgSender(), spender, value); + return true; + } + + function approveAndCall( + address spender, + uint256 value, + bytes calldata extraData + ) external override returns (bool) { + _approve(_msgSender(), spender, value); + require( + IexecTokenSpender(spender).receiveApproval( + _msgSender(), + value, + address(this), + extraData + ), + "approval-refused" + ); + return true; + } + + function transferFrom( + address sender, + address recipient, + uint256 amount + ) external override returns (bool) { + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + _transfer(sender, recipient, amount); + // TEMPORARY MIGRATION FIX: Check allowance to prevent underflow and revert without reason for backward compatibility + // TODO: Remove this in the next major version + uint256 currentAllowance = $.m_allowances[sender][_msgSender()]; + if (currentAllowance < amount) { + revert(); + } + _approve(sender, _msgSender(), currentAllowance - amount); + return true; + } + + function increaseAllowance( + address spender, + uint256 addedValue + ) external override returns (bool) { + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + _approve(_msgSender(), spender, $.m_allowances[_msgSender()][spender] + addedValue); + return true; + } + + function decreaseAllowance( + address spender, + uint256 subtractedValue + ) external override returns (bool) { + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + // TEMPORARY MIGRATION FIX: Check allowance to prevent underflow and revert without reason for backward compatibility + // TODO: Remove this in the next major version + uint256 currentAllowance = $.m_allowances[_msgSender()][spender]; + if (currentAllowance < subtractedValue) { + revert(); + } + _approve(_msgSender(), spender, currentAllowance - subtractedValue); + return true; + } + + function _transferUnchecked(address sender, address recipient, uint256 amount) internal { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + uint256 senderBalance = $.m_balances[sender]; + // TEMPORARY MIGRATION FIX: Check balance to prevent underflow and revert without reason for backward compatibility + // TODO: Remove this in the next major version + if (senderBalance < amount) { + revert(); + } + $.m_balances[sender] = senderBalance - amount; + $.m_balances[recipient] = $.m_balances[recipient] + amount; + emit Transfer(sender, recipient, amount); + } + + function _transfer(address sender, address recipient, uint256 amount) internal { + _transferUnchecked(sender, recipient, amount); + } + + function _mint(address account, uint256 amount) internal { + require(account != address(0), "ERC20: mint to the zero address"); + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + $.m_totalSupply = $.m_totalSupply + amount; + $.m_balances[account] = $.m_balances[account] + amount; + emit Transfer(address(0), account, amount); + } + + function _burn(address account, uint256 amount) internal { + require(account != address(0), "ERC20: burn from the zero address"); + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + uint256 accountBalance = $.m_balances[account]; + // TEMPORARY MIGRATION FIX: Check balance to prevent underflow and revert without reason for backward compatibility + // TODO: Remove this in the next major version + if (accountBalance < amount) { + revert(); + } + $.m_totalSupply = $.m_totalSupply - amount; + $.m_balances[account] = accountBalance - amount; + emit Transfer(account, address(0), amount); + } + + function _approve(address owner, address spender, uint256 amount) internal { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + $.m_allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } } diff --git a/docs/solidity/index.md b/docs/solidity/index.md index 4e27906e..52e1af24 100644 --- a/docs/solidity/index.md +++ b/docs/solidity/index.md @@ -12,44 +12,6 @@ Changing the name or the path would cause a breaking change in the SDK._ _Every facet must inherit from this contract._ -## IexecERC20Base - -### transfer - -```solidity -function transfer(address recipient, uint256 amount) external returns (bool) -``` - -### approve - -```solidity -function approve(address spender, uint256 value) external returns (bool) -``` - -### approveAndCall - -```solidity -function approveAndCall(address spender, uint256 value, bytes extraData) external returns (bool) -``` - -### transferFrom - -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) -``` - -### increaseAllowance - -```solidity -function increaseAllowance(address spender, uint256 addedValue) external returns (bool) -``` - -### decreaseAllowance - -```solidity -function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) -``` - ## IexecEscrow ### Transfer @@ -232,6 +194,42 @@ matchOrders specific notes: | ---- | ---- | ----------- | | [0] | bool | success True if operation succeeded @custom:example ```solidity // Compute deal cost uint256 dealCost = (appPrice + datasetPrice + workerpoolPrice) * volume; // Encode matchOrders operation with selector bytes memory data = abi.encodeWithSelector( IexecPoco1.matchOrders.selector, appOrder, datasetOrder, workerpoolOrder, requestOrder ); // Call the RLC contract with the encoded data. RLC(token).approveAndCall(iexecProxy, dealCost, data); ``` | +### transfer + +```solidity +function transfer(address recipient, uint256 amount) external returns (bool) +``` + +### approve + +```solidity +function approve(address spender, uint256 value) external returns (bool) +``` + +### approveAndCall + +```solidity +function approveAndCall(address spender, uint256 value, bytes extraData) external returns (bool) +``` + +### transferFrom + +```solidity +function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) +``` + +### increaseAllowance + +```solidity +function increaseAllowance(address spender, uint256 addedValue) external returns (bool) +``` + +### decreaseAllowance + +```solidity +function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) +``` + ## IexecOrderManagementFacet ### manageAppOrder diff --git a/docs/uml/class-uml-IexecEscrows.svg b/docs/uml/class-uml-IexecEscrows.svg index 0475e018..82d94656 100644 --- a/docs/uml/class-uml-IexecEscrows.svg +++ b/docs/uml/class-uml-IexecEscrows.svg @@ -4,746 +4,711 @@ - - + + UmlClassDiagram - + 3 - -<<Abstract>> -FacetBase -contracts/abstract/FacetBase.sol - -Internal: -   CONTRIBUTION_DEADLINE_RATIO: uint256 -   REVEAL_DEADLINE_RATIO: uint256 -   FINAL_DEADLINE_RATIO: uint256 -   WORKERPOOL_STAKE_RATIO: uint256 -   KITTY_RATIO: uint256 -   KITTY_MIN: uint256 -   KITTY_ADDRESS: address -   GROUPMEMBER_PURPOSE: uint256 - -Internal: -    owner(): address -    _msgSender(): address -Public: -    <<modifier>> onlyOwner() + +<<Abstract>> +FacetBase +contracts/abstract/FacetBase.sol + +Internal: +   CONTRIBUTION_DEADLINE_RATIO: uint256 +   REVEAL_DEADLINE_RATIO: uint256 +   FINAL_DEADLINE_RATIO: uint256 +   WORKERPOOL_STAKE_RATIO: uint256 +   KITTY_RATIO: uint256 +   KITTY_MIN: uint256 +   KITTY_ADDRESS: address +   GROUPMEMBER_PURPOSE: uint256 + +Internal: +    owner(): address +    _msgSender(): address +Public: +    <<modifier>> onlyOwner() 4 - -<<Abstract>> -IexecERC20Base -contracts/abstract/IexecERC20Base.sol - -Internal: -    _transferUnchecked(sender: address, recipient: address, amount: uint256) -    _transfer(sender: address, recipient: address, amount: uint256) -    _mint(account: address, amount: uint256) -    _burn(account: address, amount: uint256) -    _approve(owner: address, spender: address, amount: uint256) -External: -    transfer(recipient: address, amount: uint256): bool -    approve(spender: address, value: uint256): bool -    approveAndCall(spender: address, value: uint256, extraData: bytes): bool -    transferFrom(sender: address, recipient: address, amount: uint256): bool -    increaseAllowance(spender: address, addedValue: uint256): bool -    decreaseAllowance(spender: address, subtractedValue: uint256): bool + +<<Abstract>> +IexecEscrow +contracts/abstract/IexecEscrow.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) - -4->3 - - - - - -26 - -<<Interface>> -IexecERC20 -contracts/interfaces/IexecERC20.sol - -External: -     transfer(address, uint256): bool -     approve(address, uint256): bool -     transferFrom(address, address, uint256): bool -     increaseAllowance(address, uint256): bool -     decreaseAllowance(address, uint256): bool -     approveAndCall(address, uint256, bytes): bool -Public: -    <<event>> Transfer(from: address, to: address, value: uint256) -    <<event>> Approval(owner: address, spender: address, value: uint256) -    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) -    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) -    <<event>> Lock(owner: address, amount: uint256) -    <<event>> Unlock(owner: address, amount: uint256) - - -4->26 - - +4->3 + + - - -37 - -<<Interface>> -IexecTokenSpender -contracts/interfaces/IexecTokenSpender.sol - -External: -     receiveApproval(address, uint256, address, bytes): bool - - - -4->37 - - + + +62 + +<<Library>> +PocoStorageLib +contracts/libs/PocoStorageLib.sol + +Private: +   POCO_STORAGE_LOCATION: bytes32 + +Internal: +    getPocoStorage(): ($: PocoStorage) + + + +4->62 + + 63 - -<<Library>> -PocoStorageLib -contracts/libs/PocoStorageLib.sol - -Private: -   POCO_STORAGE_LOCATION: bytes32 - -Internal: -    getPocoStorage(): ($: PocoStorage) + +<<Struct>> +PocoStorage +contracts/libs/PocoStorageLib.sol + +m_appregistry: IRegistry +m_datasetregistry: IRegistry +m_workerpoolregistry: IRegistry +m_baseToken: IERC20 +m_name: string +m_symbol: string +m_decimals: uint8 +m_totalSupply: uint256 +m_balances: mapping(address=>uint256) +m_frozens: mapping(address=>uint256) +m_allowances: mapping(address=>mapping(address=>uint256)) +m_eip712DomainSeparator: bytes32 +m_presigned: mapping(bytes32=>address) +m_consumed: mapping(bytes32=>uint256) +m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) +m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) +m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) +m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) +m_workerScores: mapping(address=>uint256) +m_teebroker: address +m_callbackgas: uint256 +m_categories: IexecLibCore_v5.Category[] +m_v3_iexecHub: IexecHubV3Interface +m_v3_scoreImported: mapping(address=>bool) +m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) - + 4->63 - - + + - - -64 - -<<Struct>> -PocoStorage -contracts/libs/PocoStorageLib.sol - -m_appregistry: IRegistry -m_datasetregistry: IRegistry -m_workerpoolregistry: IRegistry -m_baseToken: IERC20 -m_name: string -m_symbol: string -m_decimals: uint8 -m_totalSupply: uint256 -m_balances: mapping(address=>uint256) -m_frozens: mapping(address=>uint256) -m_allowances: mapping(address=>mapping(address=>uint256)) -m_eip712DomainSeparator: bytes32 -m_presigned: mapping(bytes32=>address) -m_consumed: mapping(bytes32=>uint256) -m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) -m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) -m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) -m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) -m_workerScores: mapping(address=>uint256) -m_teebroker: address -m_callbackgas: uint256 -m_categories: IexecLibCore_v5.Category[] -m_v3_iexecHub: IexecHubV3Interface -m_v3_scoreImported: mapping(address=>bool) -m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) - - - -4->64 - - - - + -5 - -<<Abstract>> -IexecEscrow -contracts/abstract/IexecEscrow.sol - -Private: -    _transfer(from: address, to: address, value: uint256) -Internal: -    lock(account: address, value: uint256) -    unlock(account: address, value: uint256) -    reward(account: address, value: uint256, ref: bytes32) -    seize(account: address, value: uint256, ref: bytes32) -Public: -    <<event>> Transfer(from: address, to: address, value: uint256) -    <<event>> Lock(owner: address, amount: uint256) -    <<event>> Unlock(owner: address, amount: uint256) -    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) -    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) - - - -5->3 - - - - +11 + +IexecEscrowTokenFacet +contracts/facets/IexecEscrowTokenFacet.sol + +Internal: +    _executeOperation(sender: address, data: bytes) +    _validateMatchOrders(sender: address, data: bytes) +    _deposit(from: address, amount: uint256) +    _withdraw(to: address, amount: uint256) +    _transferUnchecked(sender: address, recipient: address, amount: uint256) +    _transfer(sender: address, recipient: address, amount: uint256) +    _mint(account: address, amount: uint256) +    _burn(account: address, amount: uint256) +    _approve(owner: address, spender: address, amount: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    deposit(amount: uint256): bool +    depositFor(amount: uint256, target: address): bool +    depositForArray(amounts: uint256[], targets: address[]): bool +    withdraw(amount: uint256): bool +    withdrawTo(amount: uint256, target: address): bool +    recover(): uint256 <<onlyOwner>> +    receiveApproval(sender: address, amount: uint256, token: address, data: bytes): bool +    transfer(recipient: address, amount: uint256): bool +    approve(spender: address, value: uint256): bool +    approveAndCall(spender: address, value: uint256, extraData: bytes): bool +    transferFrom(sender: address, recipient: address, amount: uint256): bool +    increaseAllowance(spender: address, addedValue: uint256): bool +    decreaseAllowance(spender: address, subtractedValue: uint256): bool + + -5->63 - - - - - -5->64 - - +11->3 + + - + -12 - -IexecEscrowTokenFacet -contracts/facets/IexecEscrowTokenFacet.sol - -Internal: -    _executeOperation(sender: address, data: bytes) -    _validateMatchOrders(sender: address, data: bytes) -    _deposit(from: address, amount: uint256) -    _withdraw(to: address, amount: uint256) -External: -    <<payable>> null() -    <<payable>> null() -    deposit(amount: uint256): bool -    depositFor(amount: uint256, target: address): bool -    depositForArray(amounts: uint256[], targets: address[]): bool -    withdraw(amount: uint256): bool -    withdrawTo(amount: uint256, target: address): bool -    recover(): uint256 <<onlyOwner>> -    receiveApproval(sender: address, amount: uint256, token: address, data: bytes): bool - - - -12->4 - - +25 + +<<Interface>> +IexecERC20 +contracts/interfaces/IexecERC20.sol + +External: +     transfer(address, uint256): bool +     approve(address, uint256): bool +     transferFrom(address, address, uint256): bool +     increaseAllowance(address, uint256): bool +     decreaseAllowance(address, uint256): bool +     approveAndCall(address, uint256, bytes): bool +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Approval(owner: address, spender: address, value: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) + + + +11->25 + + - - -27 - -<<Interface>> -IexecEscrowToken -contracts/interfaces/IexecEscrowToken.sol - -External: -     null() -     null() -     deposit(uint256): bool -     depositFor(uint256, address): bool -     depositForArray(uint256[], address[]): bool -     withdraw(uint256): bool -     withdrawTo(uint256, address): bool -     recover(): uint256 - - - -12->27 - - + + +26 + +<<Interface>> +IexecEscrowToken +contracts/interfaces/IexecEscrowToken.sol + +External: +     null() +     null() +     deposit(uint256): bool +     depositFor(uint256, address): bool +     depositForArray(uint256[], address[]): bool +     withdraw(uint256): bool +     withdrawTo(uint256, address): bool +     recover(): uint256 + + + +11->26 + + - + + +29 + +<<Interface>> +IexecPoco1 +contracts/interfaces/IexecPoco1.sol + +External: +     verifySignature(address, bytes32, bytes): bool +     verifyPresignature(address, bytes32): bool +     verifyPresignatureOrSignature(address, bytes32, bytes): bool +     assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) +     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> DealSponsored(dealId: bytes32, sponsor: address) + + + +11->29 + + + + -30 - -<<Interface>> -IexecPoco1 -contracts/interfaces/IexecPoco1.sol - -External: -     verifySignature(address, bytes32, bytes): bool -     verifyPresignature(address, bytes32): bool -     verifyPresignatureOrSignature(address, bytes32, bytes): bool -     assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) -     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 -     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 -Public: -    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) -    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) -    <<event>> DealSponsored(dealId: bytes32, sponsor: address) - - - -12->30 - - +36 + +<<Interface>> +IexecTokenSpender +contracts/interfaces/IexecTokenSpender.sol + +External: +     receiveApproval(address, uint256, address, bytes): bool + + + +11->36 + + - - -12->37 - - + + +51 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +11->51 + + - - -52 - -<<Library>> -IexecLibOrders_v5 -contracts/libs/IexecLibOrders_v5.sol - -Public: -   EIP712DOMAIN_TYPEHASH: bytes32 -   APPORDER_TYPEHASH: bytes32 -   DATASETORDER_TYPEHASH: bytes32 -   WORKERPOOLORDER_TYPEHASH: bytes32 -   REQUESTORDER_TYPEHASH: bytes32 -   APPORDEROPERATION_TYPEHASH: bytes32 -   DATASETORDEROPERATION_TYPEHASH: bytes32 -   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 -   REQUESTORDEROPERATION_TYPEHASH: bytes32 - -Public: -    hash(_domain: EIP712Domain): (domainhash: bytes32) -    hash(_apporder: AppOrder): (apphash: bytes32) -    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) -    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) -    hash(_requestorder: RequestOrder): (requesthash: bytes32) -    hash(_apporderoperation: AppOrderOperation): bytes32 -    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 -    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 -    hash(_requestorderoperation: RequestOrderOperation): bytes32 - - - -12->52 - - + + +11->62 + + - - -12->63 - - + + +11->63 + + - - -12->64 - - + + +27 + +<<Interface>> +IexecHubV3Interface +contracts/interfaces/IexecHubV3Interface.sol + +External: +     viewScore(worker: address): uint256 + + + +29->51 + + - - -28 - -<<Interface>> -IexecHubV3Interface -contracts/interfaces/IexecHubV3Interface.sol - -External: -     viewScore(worker: address): uint256 - - - -30->52 - - + + +54 + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +29->54 + + 55 - -<<Struct>> -AppOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appprice: uint256 -volume: uint256 -tag: bytes32 -datasetrestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - - -30->55 - - + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +29->55 + + 56 - -<<Struct>> -DatasetOrder -contracts/libs/IexecLibOrders_v5.sol - -dataset: address -datasetprice: uint256 -volume: uint256 -tag: bytes32 -apprestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - - -30->56 - - + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +29->56 + + 57 - -<<Struct>> -WorkerpoolOrder -contracts/libs/IexecLibOrders_v5.sol - -workerpool: address -workerpoolprice: uint256 -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -apprestrict: address -datasetrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - - -30->57 - - + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + + +29->57 + + - - -58 - -<<Struct>> -RequestOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appmaxprice: uint256 -dataset: address -datasetmaxprice: uint256 -workerpool: address -workerpoolmaxprice: uint256 -requester: address -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -beneficiary: address -callback: address -params: string -salt: bytes32 -sign: bytes - - - -30->58 - - + + +37 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol - - -38 - -<<Library>> -IexecLibCore_v5 -contracts/libs/IexecLibCore_v5.sol + + +53 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + + +51->53 + + - - -54 - -<<Struct>> -EIP712Domain -contracts/libs/IexecLibOrders_v5.sol - -name: string -version: string -chainId: uint256 -verifyingContract: address - - - -52->54 - - + + +51->54 + + - - -52->55 - - + + +51->55 + + - - -52->56 - - + + +51->56 + + - - -52->57 - - + + +51->57 + + - - -52->58 - - + + +58 + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + + +51->58 + + 59 - -<<Struct>> -AppOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: AppOrder -operation: OrderOperationEnum -sign: bytes - - - -52->59 - - + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + + +51->59 + + 60 - -<<Struct>> -DatasetOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: DatasetOrder -operation: OrderOperationEnum -sign: bytes - - - -52->60 - - + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +51->60 + + 61 - -<<Struct>> -WorkerpoolOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: WorkerpoolOrder -operation: OrderOperationEnum -sign: bytes - - - -52->61 - - + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +51->61 + + - - -62 - -<<Struct>> -RequestOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: RequestOrder -operation: OrderOperationEnum -sign: bytes - - - -52->62 - - + + +52 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + + +52->51 + + - - -53 - -<<Enum>> -OrderOperationEnum -contracts/libs/IexecLibOrders_v5.sol - -SIGN: 0 -CLOSE: 1 - - + + +53->51 + + + + + +54->51 + + + + + +55->51 + + + + -53->52 - - +56->51 + + - + -54->52 - - +57->51 + + - + -55->52 - - - - - -56->52 - - - - - -57->52 - - +58->51 + + - + 58->52 - - + + + + + +58->54 + + + + + +59->51 + + - + 59->52 - - - - - -59->53 - - + + - + 59->55 - - + + + + + +60->51 + + - + 60->52 - - - - - -60->53 - - + + - + 60->56 - - + + + + + +61->51 + + - + 61->52 - - - - - -61->53 - - + + - + 61->57 - - + + - - -62->52 - - + + +62->63 + + - + + +63->27 + + + + -62->53 - - +63->37 + + - - -62->58 - - + + +63->62 + + + + + +64 + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool - + 63->64 - - - - - -64->28 - - - - - -64->38 - - - - - -64->63 - - - - - -65 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool - - - -64->65 - - + + diff --git a/docs/uml/class-uml-IexecPocoBoostFacet.svg b/docs/uml/class-uml-IexecPocoBoostFacet.svg index c4627185..73bdaf8f 100644 --- a/docs/uml/class-uml-IexecPocoBoostFacet.svg +++ b/docs/uml/class-uml-IexecPocoBoostFacet.svg @@ -33,9 +33,9 @@ Public:    <<modifier>> onlyOwner() - + -5 +4 <<Abstract>> IexecEscrow @@ -55,15 +55,15 @@    <<event>> Reward(owner: address, amount: uint256, ref: bytes32)    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) - + -5->3 +4->3 - + -63 +62 <<Library>> PocoStorageLib @@ -75,15 +75,15 @@ Internal:    getPocoStorage(): ($: PocoStorage) - + -5->63 +4->62 - + -64 +63 <<Struct>> PocoStorage @@ -115,15 +115,15 @@ m_v3_scoreImported: mapping(address=>bool) m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) - + -5->64 +4->63 - + -6 +5 <<Abstract>> IexecPocoCommon @@ -132,15 +132,15 @@ Internal:    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 - + -6->3 +5->3 - + -52 +51 <<Library>> IexecLibOrders_v5 @@ -168,27 +168,27 @@    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32    hash(_requestorderoperation: RequestOrderOperation): bytes32 - + -6->52 +5->51 - + -6->63 +5->62 - + -6->64 +5->63 - + -7 +6 <<Abstract>> SignatureVerifier @@ -202,27 +202,27 @@    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool - + -7->3 +6->3 - + -7->63 +6->62 - + -7->64 +6->63 - + -69 +68 <<Interface>> IOracleConsumer @@ -231,9 +231,9 @@ External:     receiveResult(taskId: bytes32, resultsCallback: bytes) - + -19 +18 IexecPocoBoostFacet contracts/facets/IexecPocoBoostFacet.sol @@ -247,39 +247,39 @@    pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes)    claimBoost(dealId: bytes32, index: uint256) - + -19->3 +18->3 - + -19->5 +18->4 - + -19->6 +18->5 - + -19->7 +18->6 - + -19->69 +18->68 - + -34 +33 <<Interface>> IexecPocoBoost @@ -297,29 +297,29 @@    <<event>> TaskClaimed(taskid: bytes32)    <<event>> DealSponsoredBoost(dealId: bytes32, sponsor: address) - + -19->34 +18->33 - + -38 +37 <<Library>> IexecLibCore_v5 contracts/libs/IexecLibCore_v5.sol - + -19->38 +18->37 - + -46 +45 <<Struct>> DealBoost @@ -340,15 +340,15 @@ shortTag: bytes3 sponsor: address - + -19->46 +18->45 - + -47 +46 <<Enum>> TaskStatusEnum @@ -360,15 +360,15 @@ COMPLETED: 3 FAILED: 4 - + -19->47 +18->46 - + -48 +47 <<Struct>> Task @@ -390,21 +390,21 @@ resultsTimestamp: uint256 resultsCallback: bytes - + -19->48 +18->47 - + -19->52 +18->51 - + -55 +54 <<Struct>> AppOrder @@ -420,15 +420,15 @@ salt: bytes32 sign: bytes - + -19->55 +18->54 - + -56 +55 <<Struct>> DatasetOrder @@ -444,15 +444,15 @@ salt: bytes32 sign: bytes - + -19->56 +18->55 - + -57 +56 <<Struct>> WorkerpoolOrder @@ -470,15 +470,15 @@ salt: bytes32 sign: bytes - + -19->57 +18->56 - + -58 +57 <<Struct>> RequestOrder @@ -501,27 +501,27 @@ salt: bytes32 sign: bytes - + -19->58 +18->57 - + -19->63 +18->62 - + -19->64 +18->63 - + -80 +79 <<Interface>> IWorkerpool @@ -533,15 +533,15 @@     m_schedulerRewardRatioPolicy(): uint256     m_workerStakeRatioPolicy(): uint256 - + -19->80 +18->79 - + -28 +27 <<Interface>> IexecHubV3Interface @@ -550,63 +550,63 @@ External:     viewScore(worker: address): uint256 - + -34->52 +33->51 - + -34->55 +33->54 - + -34->56 +33->55 - + -34->57 +33->56 - + -34->58 +33->57 - + -46->38 +45->37 - + -47->38 +46->37 - + -48->38 +47->37 - + -48->47 +47->46 - + -54 +53 <<Struct>> EIP712Domain @@ -617,39 +617,39 @@ chainId: uint256 verifyingContract: address - + -52->54 +51->53 - + -52->55 +51->54 - + -52->56 +51->55 - + -52->57 +51->56 - + -52->58 +51->57 - + -59 +58 <<Struct>> AppOrderOperation @@ -659,15 +659,15 @@ operation: OrderOperationEnum sign: bytes - + -52->59 +51->58 - + -60 +59 <<Struct>> DatasetOrderOperation @@ -677,15 +677,15 @@ operation: OrderOperationEnum sign: bytes - + -52->60 +51->59 - + -61 +60 <<Struct>> WorkerpoolOrderOperation @@ -695,15 +695,15 @@ operation: OrderOperationEnum sign: bytes - + -52->61 +51->60 - + -62 +61 <<Struct>> RequestOrderOperation @@ -713,15 +713,15 @@ operation: OrderOperationEnum sign: bytes - + -52->62 +51->61 - + -53 +52 <<Enum>> OrderOperationEnum @@ -730,141 +730,141 @@ SIGN: 0 CLOSE: 1 - + -53->52 +52->51 - + -54->52 +53->51 - + -55->52 +54->51 - + -56->52 +55->51 - + -57->52 +56->51 - + -58->52 +57->51 - + -59->52 +58->51 - + -59->53 +58->52 - + -59->55 +58->54 - + -60->52 +59->51 - + -60->53 +59->52 - + -60->56 +59->55 - + -61->52 +60->51 - + -61->53 +60->52 - + -61->57 +60->56 - + -62->52 +61->51 - + -62->53 +61->52 - + -62->58 +61->57 - + -63->64 +62->63 - + -64->28 +63->27 - + -64->38 +63->37 - + -64->63 +63->62 - + -65 +64 <<Interface>> IRegistry @@ -873,9 +873,9 @@ External:     isRegistered(_entry: address): bool - + -64->65 +63->64 diff --git a/docs/uml/class-uml-IexecPocoFacets.svg b/docs/uml/class-uml-IexecPocoFacets.svg index dec009d2..8c4f6070 100644 --- a/docs/uml/class-uml-IexecPocoFacets.svg +++ b/docs/uml/class-uml-IexecPocoFacets.svg @@ -33,9 +33,9 @@ Public:    <<modifier>> onlyOwner() - + -5 +4 <<Abstract>> IexecEscrow @@ -55,15 +55,15 @@    <<event>> Reward(owner: address, amount: uint256, ref: bytes32)    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) - + -5->3 +4->3 - + -63 +62 <<Library>> PocoStorageLib @@ -75,15 +75,15 @@ Internal:    getPocoStorage(): ($: PocoStorage) - + -5->63 +4->62 - + -64 +63 <<Struct>> PocoStorage @@ -115,15 +115,15 @@ m_v3_scoreImported: mapping(address=>bool) m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) - + -5->64 +4->63 - + -6 +5 <<Abstract>> IexecPocoCommon @@ -132,15 +132,15 @@ Internal:    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 - + -6->3 +5->3 - + -52 +51 <<Library>> IexecLibOrders_v5 @@ -168,27 +168,27 @@    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32    hash(_requestorderoperation: RequestOrderOperation): bytes32 - + -6->52 +5->51 - + -6->63 +5->62 - + -6->64 +5->63 - + -7 +6 <<Abstract>> SignatureVerifier @@ -202,27 +202,27 @@    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool - + -7->3 +6->3 - + -7->63 +6->62 - + -7->64 +6->63 - + -14 +13 <<Struct>> Matching @@ -237,9 +237,9 @@ requestorderHash: bytes32 hasDataset: bool - + -15 +14 IexecPoco1Facet contracts/facets/IexecPoco1Facet.sol @@ -255,39 +255,39 @@    matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32    sponsorMatchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 - + -15->3 +14->3 - + -15->5 +14->4 - + -15->6 +14->5 - + -15->7 +14->6 - + -15->14 +14->13 - + -30 +29 <<Interface>> IexecPoco1 @@ -305,43 +305,43 @@    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256)    <<event>> DealSponsored(dealId: bytes32, sponsor: address) - + -15->30 +14->29 - + -31 +30 <<Interface>> IexecPoco1Errors contracts/interfaces/IexecPoco1Errors.sol - + -15->31 +14->30 - + -38 +37 <<Library>> IexecLibCore_v5 contracts/libs/IexecLibCore_v5.sol - + -15->38 +14->37 - + -45 +44 <<Struct>> Deal @@ -364,21 +364,21 @@ schedulerRewardRatio: uint256 sponsor: address - + -15->45 +14->44 - + -15->52 +14->51 - + -55 +54 <<Struct>> AppOrder @@ -394,15 +394,15 @@ salt: bytes32 sign: bytes - + -15->55 +14->54 - + -56 +55 <<Struct>> DatasetOrder @@ -418,15 +418,15 @@ salt: bytes32 sign: bytes - + -15->56 +14->55 - + -57 +56 <<Struct>> WorkerpoolOrder @@ -444,15 +444,15 @@ salt: bytes32 sign: bytes - + -15->57 +14->56 - + -58 +57 <<Struct>> RequestOrder @@ -475,27 +475,27 @@ salt: bytes32 sign: bytes - + -15->58 +14->57 - + -15->63 +14->62 - + -15->64 +14->63 - + -80 +79 <<Interface>> IWorkerpool @@ -507,15 +507,15 @@     m_schedulerRewardRatioPolicy(): uint256     m_workerStakeRatioPolicy(): uint256 - + -15->80 +14->79 - + -16 +15 IexecPoco2Facet contracts/facets/IexecPoco2Facet.sol @@ -541,27 +541,27 @@    initialize(_dealid: bytes32, idx: uint256): bytes32    claim(_taskid: bytes32) - + -16->3 +15->3 - + -16->5 +15->4 - + -16->7 +15->6 - + -32 +31 <<Interface>> IexecPoco2 @@ -589,27 +589,27 @@    <<event>> TaskFinalize(taskid: bytes32, results: bytes)    <<event>> TaskClaimed(taskid: bytes32) - + -16->32 +15->31 - + -16->38 +15->37 - + -16->45 +15->44 - + -48 +47 <<Struct>> Task @@ -631,15 +631,15 @@ resultsTimestamp: uint256 resultsCallback: bytes - + -16->48 +15->47 - + -49 +48 <<Struct>> Consensus @@ -648,15 +648,15 @@ group: mapping(bytes32=>uint256) total: uint256 - + -16->49 +15->48 - + -51 +50 <<Struct>> Contribution @@ -668,27 +668,27 @@ enclaveChallenge: address weight: uint256 - + -16->51 +15->50 - + -16->63 +15->62 - + -16->64 +15->63 - + -28 +27 <<Interface>> IexecHubV3Interface @@ -697,39 +697,39 @@ External:     viewScore(worker: address): uint256 - + -30->52 +29->51 - + -30->55 +29->54 - + -30->56 +29->55 - + -30->57 +29->56 - + -30->58 +29->57 - + -44 +43 <<Struct>> Resource @@ -739,27 +739,27 @@ owner: address price: uint256 - + -44->38 +43->37 - + -45->38 +44->37 - + -45->44 +44->43 - + -47 +46 <<Enum>> TaskStatusEnum @@ -771,33 +771,33 @@ COMPLETED: 3 FAILED: 4 - + -47->38 +46->37 - + -48->38 +47->37 - + -48->47 +47->46 - + -49->38 +48->37 - + -50 +49 <<Enum>> ContributionStatusEnum @@ -808,27 +808,27 @@ PROVED: 2 REJECTED: 3 - + -50->38 +49->37 - + -51->38 +50->37 - + -51->50 +50->49 - + -54 +53 <<Struct>> EIP712Domain @@ -839,39 +839,39 @@ chainId: uint256 verifyingContract: address - + -52->54 +51->53 - + -52->55 +51->54 - + -52->56 +51->55 - + -52->57 +51->56 - + -52->58 +51->57 - + -59 +58 <<Struct>> AppOrderOperation @@ -881,15 +881,15 @@ operation: OrderOperationEnum sign: bytes - + -52->59 +51->58 - + -60 +59 <<Struct>> DatasetOrderOperation @@ -899,15 +899,15 @@ operation: OrderOperationEnum sign: bytes - + -52->60 +51->59 - + -61 +60 <<Struct>> WorkerpoolOrderOperation @@ -917,15 +917,15 @@ operation: OrderOperationEnum sign: bytes - + -52->61 +51->60 - + -62 +61 <<Struct>> RequestOrderOperation @@ -935,15 +935,15 @@ operation: OrderOperationEnum sign: bytes - + -52->62 +51->61 - + -53 +52 <<Enum>> OrderOperationEnum @@ -952,141 +952,141 @@ SIGN: 0 CLOSE: 1 - + -53->52 +52->51 - + -54->52 +53->51 - + -55->52 +54->51 - + -56->52 +55->51 - + -57->52 +56->51 - + -58->52 +57->51 - + -59->52 +58->51 - + -59->53 +58->52 - + -59->55 +58->54 - + -60->52 +59->51 - + -60->53 +59->52 - + -60->56 +59->55 - + -61->52 +60->51 - + -61->53 +60->52 - + -61->57 +60->56 - + -62->52 +61->51 - + -62->53 +61->52 - + -62->58 +61->57 - + -63->64 +62->63 - + -64->28 +63->27 - + -64->38 +63->37 - + -64->63 +63->62 - + -65 +64 <<Interface>> IRegistry @@ -1095,9 +1095,9 @@ External:     isRegistered(_entry: address): bool - + -64->65 +63->64 diff --git a/docs/uml/class-uml-dir-facets.svg b/docs/uml/class-uml-dir-facets.svg index ffdc72e2..98389597 100644 --- a/docs/uml/class-uml-dir-facets.svg +++ b/docs/uml/class-uml-dir-facets.svg @@ -66,25 +66,36 @@ 4 - -IexecEscrowTokenFacet -contracts/facets/IexecEscrowTokenFacet.sol - -Internal: -    _executeOperation(sender: address, data: bytes) -    _validateMatchOrders(sender: address, data: bytes) -    _deposit(from: address, amount: uint256) -    _withdraw(to: address, amount: uint256) -External: -    <<payable>> null() -    <<payable>> null() -    deposit(amount: uint256): bool -    depositFor(amount: uint256, target: address): bool -    depositForArray(amounts: uint256[], targets: address[]): bool -    withdraw(amount: uint256): bool -    withdrawTo(amount: uint256, target: address): bool -    recover(): uint256 <<onlyOwner>> -    receiveApproval(sender: address, amount: uint256, token: address, data: bytes): bool + +IexecEscrowTokenFacet +contracts/facets/IexecEscrowTokenFacet.sol + +Internal: +    _executeOperation(sender: address, data: bytes) +    _validateMatchOrders(sender: address, data: bytes) +    _deposit(from: address, amount: uint256) +    _withdraw(to: address, amount: uint256) +    _transferUnchecked(sender: address, recipient: address, amount: uint256) +    _transfer(sender: address, recipient: address, amount: uint256) +    _mint(account: address, amount: uint256) +    _burn(account: address, amount: uint256) +    _approve(owner: address, spender: address, amount: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    deposit(amount: uint256): bool +    depositFor(amount: uint256, target: address): bool +    depositForArray(amounts: uint256[], targets: address[]): bool +    withdraw(amount: uint256): bool +    withdrawTo(amount: uint256, target: address): bool +    recover(): uint256 <<onlyOwner>> +    receiveApproval(sender: address, amount: uint256, token: address, data: bytes): bool +    transfer(recipient: address, amount: uint256): bool +    approve(spender: address, value: uint256): bool +    approveAndCall(spender: address, value: uint256, extraData: bytes): bool +    transferFrom(sender: address, recipient: address, amount: uint256): bool +    increaseAllowance(spender: address, addedValue: uint256): bool +    decreaseAllowance(spender: address, subtractedValue: uint256): bool From 6f21ccab593c4d33e41051ca5dc2084ed0e3e066 Mon Sep 17 00:00:00 2001 From: Zied <26070035+zguesmi@users.noreply.github.com> Date: Mon, 31 Aug 2026 12:22:10 +0200 Subject: [PATCH 4/4] refactor: declare escrow and ERC-20 events once Remove the duplicate declarations of `Transfer`, `Reward`, `Seize`, `Lock` and `Unlock`. They were declared twice, in `IexecERC20` and in the abstract `IexecEscrow`, and only compiled because the two declaration sites were inherited by disjoint sets of contracts. Each event is now declared exactly once, in an interface: - `IexecERC20Events` holds `Transfer`, which both the ERC-20 surface and the escrow accounting emit. `IexecERC20` and the abstract `IexecEscrow` inherit it. - `IexecEscrowEvents` holds `Reward`, `Seize`, `Lock` and `Unlock`. These are escrow-accounting events emitted by the PoCo facets, never by ERC-20 code, so they leave the ERC-20 surface. The abstract `IexecEscrow` and the `IexecEscrowToken` interface inherit it, which keeps them reachable from `IexecInterfaceToken`. `Approval` stays in `IexecERC20`: only the ERC-20 entry points emit it. Also remove the dead `'dev-token'` entry from `skippedNetworks` in `scripts/verify.ts`; that network was deleted from `hardhat.config.ts`. No ABI change: event signatures are untouched, so topic0 does not move, and the contract-level ABIs are byte-identical. Co-Authored-By: Claude Opus 5 --- abis/contracts/interfaces/IexecERC20.json | 88 - .../interfaces/IexecERC20Events.json | 27 + .../interfaces/IexecEscrowEvents.json | 90 + .../interfaces/IexecEscrowToken.json | 88 + .../interfaces/IexecERC20.sol/IexecERC20.json | 4 - .../IexecERC20Events.json | 3 + .../IexecEscrowEvents.json | 6 + .../IexecEscrowToken.json | 4 + contracts/abstract/IexecEscrow.sol | 10 +- contracts/interfaces/IexecERC20.sol | 11 +- contracts/interfaces/IexecERC20Events.sol | 15 + contracts/interfaces/IexecEscrowEvents.sol | 17 + contracts/interfaces/IexecEscrowToken.sol | 4 +- docs/solidity/index.md | 30 - docs/uml/class-uml-IexecEscrows.svg | 1250 +++++------ docs/uml/class-uml-IexecPocoBoostFacet.svg | 1461 ++++++------- docs/uml/class-uml-IexecPocoFacets.svg | 1853 +++++++++-------- scripts/verify.ts | 2 +- 18 files changed, 2593 insertions(+), 2370 deletions(-) create mode 100644 abis/contracts/interfaces/IexecERC20Events.json create mode 100644 abis/contracts/interfaces/IexecEscrowEvents.json create mode 100644 abis/human-readable-abis/contracts/interfaces/IexecERC20Events.sol/IexecERC20Events.json create mode 100644 abis/human-readable-abis/contracts/interfaces/IexecEscrowEvents.sol/IexecEscrowEvents.json create mode 100644 contracts/interfaces/IexecERC20Events.sol create mode 100644 contracts/interfaces/IexecEscrowEvents.sol diff --git a/abis/contracts/interfaces/IexecERC20.json b/abis/contracts/interfaces/IexecERC20.json index 5d001c92..cf6b56a6 100644 --- a/abis/contracts/interfaces/IexecERC20.json +++ b/abis/contracts/interfaces/IexecERC20.json @@ -24,75 +24,6 @@ "name": "Approval", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -118,25 +49,6 @@ "name": "Transfer", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, { "inputs": [ { diff --git a/abis/contracts/interfaces/IexecERC20Events.json b/abis/contracts/interfaces/IexecERC20Events.json new file mode 100644 index 00000000..b0b55aa1 --- /dev/null +++ b/abis/contracts/interfaces/IexecERC20Events.json @@ -0,0 +1,27 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } +] diff --git a/abis/contracts/interfaces/IexecEscrowEvents.json b/abis/contracts/interfaces/IexecEscrowEvents.json new file mode 100644 index 00000000..cea6073d --- /dev/null +++ b/abis/contracts/interfaces/IexecEscrowEvents.json @@ -0,0 +1,90 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Lock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Reward", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Seize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + } +] diff --git a/abis/contracts/interfaces/IexecEscrowToken.json b/abis/contracts/interfaces/IexecEscrowToken.json index 48147e2b..fb13a984 100644 --- a/abis/contracts/interfaces/IexecEscrowToken.json +++ b/abis/contracts/interfaces/IexecEscrowToken.json @@ -20,6 +20,94 @@ "name": "UnsupportedOperation", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Lock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Reward", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Seize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + }, { "stateMutability": "payable", "type": "fallback" diff --git a/abis/human-readable-abis/contracts/interfaces/IexecERC20.sol/IexecERC20.json b/abis/human-readable-abis/contracts/interfaces/IexecERC20.sol/IexecERC20.json index a6b4632d..0b804824 100644 --- a/abis/human-readable-abis/contracts/interfaces/IexecERC20.sol/IexecERC20.json +++ b/abis/human-readable-abis/contracts/interfaces/IexecERC20.sol/IexecERC20.json @@ -1,10 +1,6 @@ [ "event Approval(address indexed,address indexed,uint256)", - "event Lock(address,uint256)", - "event Reward(address,uint256,bytes32)", - "event Seize(address,uint256,bytes32)", "event Transfer(address indexed,address indexed,uint256)", - "event Unlock(address,uint256)", "function approve(address,uint256) returns (bool)", "function approveAndCall(address,uint256,bytes) returns (bool)", "function decreaseAllowance(address,uint256) returns (bool)", diff --git a/abis/human-readable-abis/contracts/interfaces/IexecERC20Events.sol/IexecERC20Events.json b/abis/human-readable-abis/contracts/interfaces/IexecERC20Events.sol/IexecERC20Events.json new file mode 100644 index 00000000..bea19b2f --- /dev/null +++ b/abis/human-readable-abis/contracts/interfaces/IexecERC20Events.sol/IexecERC20Events.json @@ -0,0 +1,3 @@ +[ + "event Transfer(address indexed,address indexed,uint256)" +] diff --git a/abis/human-readable-abis/contracts/interfaces/IexecEscrowEvents.sol/IexecEscrowEvents.json b/abis/human-readable-abis/contracts/interfaces/IexecEscrowEvents.sol/IexecEscrowEvents.json new file mode 100644 index 00000000..e70f2078 --- /dev/null +++ b/abis/human-readable-abis/contracts/interfaces/IexecEscrowEvents.sol/IexecEscrowEvents.json @@ -0,0 +1,6 @@ +[ + "event Lock(address,uint256)", + "event Reward(address,uint256,bytes32)", + "event Seize(address,uint256,bytes32)", + "event Unlock(address,uint256)" +] diff --git a/abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json b/abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json index 4fb79f91..1065d987 100644 --- a/abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json +++ b/abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json @@ -2,6 +2,10 @@ "error CallerIsNotTheRequester()", "error OperationFailed()", "error UnsupportedOperation(bytes4)", + "event Lock(address,uint256)", + "event Reward(address,uint256,bytes32)", + "event Seize(address,uint256,bytes32)", + "event Unlock(address,uint256)", "function deposit(uint256) returns (bool)", "function depositFor(uint256,address) returns (bool)", "function depositForArray(uint256[],address[]) returns (bool)", diff --git a/contracts/abstract/IexecEscrow.sol b/contracts/abstract/IexecEscrow.sol index 1654f0d9..d3b6c207 100644 --- a/contracts/abstract/IexecEscrow.sol +++ b/contracts/abstract/IexecEscrow.sol @@ -3,18 +3,14 @@ pragma solidity ^0.8.0; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; +import {IexecERC20Events} from "../interfaces/IexecERC20Events.sol"; +import {IexecEscrowEvents} from "../interfaces/IexecEscrowEvents.sol"; import {FacetBase} from "./FacetBase.sol"; /** * @title Manage (lock/unlock/reward/seize) user funds. */ -abstract contract IexecEscrow is FacetBase { - event Transfer(address indexed from, address indexed to, uint256 value); - event Lock(address owner, uint256 amount); - event Unlock(address owner, uint256 amount); - event Reward(address owner, uint256 amount, bytes32 ref); - event Seize(address owner, uint256 amount, bytes32 ref); - +abstract contract IexecEscrow is FacetBase, IexecERC20Events, IexecEscrowEvents { /** * Lock some value of an account. * @param account The account where the value should be locked. diff --git a/contracts/interfaces/IexecERC20.sol b/contracts/interfaces/IexecERC20.sol index 9344174d..ff871d5f 100644 --- a/contracts/interfaces/IexecERC20.sol +++ b/contracts/interfaces/IexecERC20.sol @@ -3,15 +3,12 @@ pragma solidity ^0.8.0; -interface IexecERC20 { +import {IexecERC20Events} from "./IexecERC20Events.sol"; + +interface IexecERC20 is IexecERC20Events { // ERC20 standard events - event Transfer(address indexed from, address indexed to, uint256 value); + // `Transfer` is inherited from {IexecERC20Events}. event Approval(address indexed owner, address indexed spender, uint256 value); - // iExec specific events - event Reward(address owner, uint256 amount, bytes32 ref); - event Seize(address owner, uint256 amount, bytes32 ref); - event Lock(address owner, uint256 amount); - event Unlock(address owner, uint256 amount); function transfer(address, uint256) external returns (bool); function approve(address, uint256) external returns (bool); diff --git a/contracts/interfaces/IexecERC20Events.sol b/contracts/interfaces/IexecERC20Events.sol new file mode 100644 index 00000000..547485cb --- /dev/null +++ b/contracts/interfaces/IexecERC20Events.sol @@ -0,0 +1,15 @@ +// SPDX-FileCopyrightText: 2026 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +/** + * @title ERC-20 events shared by the ERC-20 surface and the escrow accounting. + * @dev `Transfer` is emitted from two places: the ERC-20 entry points of the escrow + * facet and the internal fund movements of the escrow (lock/unlock/reward). Both + * inherit this interface so the event is declared exactly once. + * `Approval` stays in {IexecERC20} because only the ERC-20 surface emits it. + */ +interface IexecERC20Events { + event Transfer(address indexed from, address indexed to, uint256 value); +} diff --git a/contracts/interfaces/IexecEscrowEvents.sol b/contracts/interfaces/IexecEscrowEvents.sol new file mode 100644 index 00000000..8902e885 --- /dev/null +++ b/contracts/interfaces/IexecEscrowEvents.sol @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2026 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +/** + * @title Escrow accounting events. + * @dev Emitted when funds of an account are frozen, released, rewarded or seized. + * These are not ERC-20 events: they are emitted by the PoCo facets that settle + * deals, never by the ERC-20 entry points. + */ +interface IexecEscrowEvents { + event Lock(address owner, uint256 amount); + event Unlock(address owner, uint256 amount); + event Reward(address owner, uint256 amount, bytes32 ref); + event Seize(address owner, uint256 amount, bytes32 ref); +} diff --git a/contracts/interfaces/IexecEscrowToken.sol b/contracts/interfaces/IexecEscrowToken.sol index 5d6e1321..9096d8cb 100644 --- a/contracts/interfaces/IexecEscrowToken.sol +++ b/contracts/interfaces/IexecEscrowToken.sol @@ -3,7 +3,9 @@ pragma solidity ^0.8.0; -interface IexecEscrowToken { +import {IexecEscrowEvents} from "./IexecEscrowEvents.sol"; + +interface IexecEscrowToken is IexecEscrowEvents { error UnsupportedOperation(bytes4 selector); error OperationFailed(); error CallerIsNotTheRequester(); diff --git a/docs/solidity/index.md b/docs/solidity/index.md index 52e1af24..c25b608d 100644 --- a/docs/solidity/index.md +++ b/docs/solidity/index.md @@ -14,36 +14,6 @@ _Every facet must inherit from this contract._ ## IexecEscrow -### Transfer - -```solidity -event Transfer(address from, address to, uint256 value) -``` - -### Lock - -```solidity -event Lock(address owner, uint256 amount) -``` - -### Unlock - -```solidity -event Unlock(address owner, uint256 amount) -``` - -### Reward - -```solidity -event Reward(address owner, uint256 amount, bytes32 ref) -``` - -### Seize - -```solidity -event Seize(address owner, uint256 amount, bytes32 ref) -``` - ## IexecCategoryManagerFacet ### createCategory diff --git a/docs/uml/class-uml-IexecEscrows.svg b/docs/uml/class-uml-IexecEscrows.svg index 82d94656..e7098baf 100644 --- a/docs/uml/class-uml-IexecEscrows.svg +++ b/docs/uml/class-uml-IexecEscrows.svg @@ -4,711 +4,749 @@ - - + + UmlClassDiagram - + 3 - -<<Abstract>> -FacetBase -contracts/abstract/FacetBase.sol - -Internal: -   CONTRIBUTION_DEADLINE_RATIO: uint256 -   REVEAL_DEADLINE_RATIO: uint256 -   FINAL_DEADLINE_RATIO: uint256 -   WORKERPOOL_STAKE_RATIO: uint256 -   KITTY_RATIO: uint256 -   KITTY_MIN: uint256 -   KITTY_ADDRESS: address -   GROUPMEMBER_PURPOSE: uint256 - -Internal: -    owner(): address -    _msgSender(): address -Public: -    <<modifier>> onlyOwner() + +<<Abstract>> +FacetBase +contracts/abstract/FacetBase.sol + +Internal: +   CONTRIBUTION_DEADLINE_RATIO: uint256 +   REVEAL_DEADLINE_RATIO: uint256 +   FINAL_DEADLINE_RATIO: uint256 +   WORKERPOOL_STAKE_RATIO: uint256 +   KITTY_RATIO: uint256 +   KITTY_MIN: uint256 +   KITTY_ADDRESS: address +   GROUPMEMBER_PURPOSE: uint256 + +Internal: +    owner(): address +    _msgSender(): address +Public: +    <<modifier>> onlyOwner() 4 - -<<Abstract>> -IexecEscrow -contracts/abstract/IexecEscrow.sol - -Private: -    _transfer(from: address, to: address, value: uint256) -Internal: -    lock(account: address, value: uint256) -    unlock(account: address, value: uint256) -    reward(account: address, value: uint256, ref: bytes32) -    seize(account: address, value: uint256, ref: bytes32) -Public: -    <<event>> Transfer(from: address, to: address, value: uint256) -    <<event>> Lock(owner: address, amount: uint256) -    <<event>> Unlock(owner: address, amount: uint256) -    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) -    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + +<<Abstract>> +IexecEscrow +contracts/abstract/IexecEscrow.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) 4->3 - - + + - - -62 - -<<Library>> -PocoStorageLib -contracts/libs/PocoStorageLib.sol - -Private: -   POCO_STORAGE_LOCATION: bytes32 - -Internal: -    getPocoStorage(): ($: PocoStorage) - - + + +26 + +<<Interface>> +IexecERC20Events +contracts/interfaces/IexecERC20Events.sol + +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) + + -4->62 - - +4->26 + + - - -63 - -<<Struct>> -PocoStorage -contracts/libs/PocoStorageLib.sol - -m_appregistry: IRegistry -m_datasetregistry: IRegistry -m_workerpoolregistry: IRegistry -m_baseToken: IERC20 -m_name: string -m_symbol: string -m_decimals: uint8 -m_totalSupply: uint256 -m_balances: mapping(address=>uint256) -m_frozens: mapping(address=>uint256) -m_allowances: mapping(address=>mapping(address=>uint256)) -m_eip712DomainSeparator: bytes32 -m_presigned: mapping(bytes32=>address) -m_consumed: mapping(bytes32=>uint256) -m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) -m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) -m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) -m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) -m_workerScores: mapping(address=>uint256) -m_teebroker: address -m_callbackgas: uint256 -m_categories: IexecLibCore_v5.Category[] -m_v3_iexecHub: IexecHubV3Interface -m_v3_scoreImported: mapping(address=>bool) -m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) - - + + +27 + +<<Interface>> +IexecEscrowEvents +contracts/interfaces/IexecEscrowEvents.sol + +Public: +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + + -4->63 - - +4->27 + + + + + +64 + +<<Library>> +PocoStorageLib +contracts/libs/PocoStorageLib.sol + +Private: +   POCO_STORAGE_LOCATION: bytes32 + +Internal: +    getPocoStorage(): ($: PocoStorage) + + + +4->64 + + + + + +65 + +<<Struct>> +PocoStorage +contracts/libs/PocoStorageLib.sol + +m_appregistry: IRegistry +m_datasetregistry: IRegistry +m_workerpoolregistry: IRegistry +m_baseToken: IERC20 +m_name: string +m_symbol: string +m_decimals: uint8 +m_totalSupply: uint256 +m_balances: mapping(address=>uint256) +m_frozens: mapping(address=>uint256) +m_allowances: mapping(address=>mapping(address=>uint256)) +m_eip712DomainSeparator: bytes32 +m_presigned: mapping(bytes32=>address) +m_consumed: mapping(bytes32=>uint256) +m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) +m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) +m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) +m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) +m_workerScores: mapping(address=>uint256) +m_teebroker: address +m_callbackgas: uint256 +m_categories: IexecLibCore_v5.Category[] +m_v3_iexecHub: IexecHubV3Interface +m_v3_scoreImported: mapping(address=>bool) +m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) + + + +4->65 + + 11 - -IexecEscrowTokenFacet -contracts/facets/IexecEscrowTokenFacet.sol - -Internal: -    _executeOperation(sender: address, data: bytes) -    _validateMatchOrders(sender: address, data: bytes) -    _deposit(from: address, amount: uint256) -    _withdraw(to: address, amount: uint256) -    _transferUnchecked(sender: address, recipient: address, amount: uint256) -    _transfer(sender: address, recipient: address, amount: uint256) -    _mint(account: address, amount: uint256) -    _burn(account: address, amount: uint256) -    _approve(owner: address, spender: address, amount: uint256) -External: -    <<payable>> null() -    <<payable>> null() -    deposit(amount: uint256): bool -    depositFor(amount: uint256, target: address): bool -    depositForArray(amounts: uint256[], targets: address[]): bool -    withdraw(amount: uint256): bool -    withdrawTo(amount: uint256, target: address): bool -    recover(): uint256 <<onlyOwner>> -    receiveApproval(sender: address, amount: uint256, token: address, data: bytes): bool -    transfer(recipient: address, amount: uint256): bool -    approve(spender: address, value: uint256): bool -    approveAndCall(spender: address, value: uint256, extraData: bytes): bool -    transferFrom(sender: address, recipient: address, amount: uint256): bool -    increaseAllowance(spender: address, addedValue: uint256): bool -    decreaseAllowance(spender: address, subtractedValue: uint256): bool + +IexecEscrowTokenFacet +contracts/facets/IexecEscrowTokenFacet.sol + +Internal: +    _executeOperation(sender: address, data: bytes) +    _validateMatchOrders(sender: address, data: bytes) +    _deposit(from: address, amount: uint256) +    _withdraw(to: address, amount: uint256) +    _transferUnchecked(sender: address, recipient: address, amount: uint256) +    _transfer(sender: address, recipient: address, amount: uint256) +    _mint(account: address, amount: uint256) +    _burn(account: address, amount: uint256) +    _approve(owner: address, spender: address, amount: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    deposit(amount: uint256): bool +    depositFor(amount: uint256, target: address): bool +    depositForArray(amounts: uint256[], targets: address[]): bool +    withdraw(amount: uint256): bool +    withdrawTo(amount: uint256, target: address): bool +    recover(): uint256 <<onlyOwner>> +    receiveApproval(sender: address, amount: uint256, token: address, data: bytes): bool +    transfer(recipient: address, amount: uint256): bool +    approve(spender: address, value: uint256): bool +    approveAndCall(spender: address, value: uint256, extraData: bytes): bool +    transferFrom(sender: address, recipient: address, amount: uint256): bool +    increaseAllowance(spender: address, addedValue: uint256): bool +    decreaseAllowance(spender: address, subtractedValue: uint256): bool - + 11->3 - - + + 25 - -<<Interface>> -IexecERC20 -contracts/interfaces/IexecERC20.sol - -External: -     transfer(address, uint256): bool -     approve(address, uint256): bool -     transferFrom(address, address, uint256): bool -     increaseAllowance(address, uint256): bool -     decreaseAllowance(address, uint256): bool -     approveAndCall(address, uint256, bytes): bool -Public: -    <<event>> Transfer(from: address, to: address, value: uint256) -    <<event>> Approval(owner: address, spender: address, value: uint256) -    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) -    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) -    <<event>> Lock(owner: address, amount: uint256) -    <<event>> Unlock(owner: address, amount: uint256) + +<<Interface>> +IexecERC20 +contracts/interfaces/IexecERC20.sol + +External: +     transfer(address, uint256): bool +     approve(address, uint256): bool +     transferFrom(address, address, uint256): bool +     increaseAllowance(address, uint256): bool +     decreaseAllowance(address, uint256): bool +     approveAndCall(address, uint256, bytes): bool +Public: +    <<event>> Approval(owner: address, spender: address, value: uint256) - + 11->25 - - - - - -26 - -<<Interface>> -IexecEscrowToken -contracts/interfaces/IexecEscrowToken.sol - -External: -     null() -     null() -     deposit(uint256): bool -     depositFor(uint256, address): bool -     depositForArray(uint256[], address[]): bool -     withdraw(uint256): bool -     withdrawTo(uint256, address): bool -     recover(): uint256 - - - -11->26 - - + + - + -29 - -<<Interface>> -IexecPoco1 -contracts/interfaces/IexecPoco1.sol - -External: -     verifySignature(address, bytes32, bytes): bool -     verifyPresignature(address, bytes32): bool -     verifyPresignatureOrSignature(address, bytes32, bytes): bool -     assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) -     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 -     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 -Public: -    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) -    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) -    <<event>> DealSponsored(dealId: bytes32, sponsor: address) - - - -11->29 - - +28 + +<<Interface>> +IexecEscrowToken +contracts/interfaces/IexecEscrowToken.sol + +External: +     null() +     null() +     deposit(uint256): bool +     depositFor(uint256, address): bool +     depositForArray(uint256[], address[]): bool +     withdraw(uint256): bool +     withdrawTo(uint256, address): bool +     recover(): uint256 + + + +11->28 + + - - -36 - -<<Interface>> -IexecTokenSpender -contracts/interfaces/IexecTokenSpender.sol - -External: -     receiveApproval(address, uint256, address, bytes): bool - - - -11->36 - - + + +31 + +<<Interface>> +IexecPoco1 +contracts/interfaces/IexecPoco1.sol + +External: +     verifySignature(address, bytes32, bytes): bool +     verifyPresignature(address, bytes32): bool +     verifyPresignatureOrSignature(address, bytes32, bytes): bool +     assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) +     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> DealSponsored(dealId: bytes32, sponsor: address) + + + +11->31 + + - + -51 - -<<Library>> -IexecLibOrders_v5 -contracts/libs/IexecLibOrders_v5.sol - -Public: -   EIP712DOMAIN_TYPEHASH: bytes32 -   APPORDER_TYPEHASH: bytes32 -   DATASETORDER_TYPEHASH: bytes32 -   WORKERPOOLORDER_TYPEHASH: bytes32 -   REQUESTORDER_TYPEHASH: bytes32 -   APPORDEROPERATION_TYPEHASH: bytes32 -   DATASETORDEROPERATION_TYPEHASH: bytes32 -   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 -   REQUESTORDEROPERATION_TYPEHASH: bytes32 - -Public: -    hash(_domain: EIP712Domain): (domainhash: bytes32) -    hash(_apporder: AppOrder): (apphash: bytes32) -    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) -    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) -    hash(_requestorder: RequestOrder): (requesthash: bytes32) -    hash(_apporderoperation: AppOrderOperation): bytes32 -    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 -    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 -    hash(_requestorderoperation: RequestOrderOperation): bytes32 - - - -11->51 - - +38 + +<<Interface>> +IexecTokenSpender +contracts/interfaces/IexecTokenSpender.sol + +External: +     receiveApproval(address, uint256, address, bytes): bool + + + +11->38 + + - - -11->62 - - + + +53 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +11->53 + + - - -11->63 - - + + +11->64 + + - - -27 - -<<Interface>> -IexecHubV3Interface -contracts/interfaces/IexecHubV3Interface.sol - -External: -     viewScore(worker: address): uint256 - - - -29->51 - - + + +11->65 + + - - -54 - -<<Struct>> -AppOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appprice: uint256 -volume: uint256 -tag: bytes32 -datasetrestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - + -29->54 - - +25->26 + + - - -55 - -<<Struct>> -DatasetOrder -contracts/libs/IexecLibOrders_v5.sol - -dataset: address -datasetprice: uint256 -volume: uint256 -tag: bytes32 -apprestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - - -29->55 - - + + +28->27 + + + + + +29 + +<<Interface>> +IexecHubV3Interface +contracts/interfaces/IexecHubV3Interface.sol + +External: +     viewScore(worker: address): uint256 + + + +31->53 + + 56 - -<<Struct>> -WorkerpoolOrder -contracts/libs/IexecLibOrders_v5.sol - -workerpool: address -workerpoolprice: uint256 -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -apprestrict: address -datasetrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - - -29->56 - - + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +31->56 + + 57 - -<<Struct>> -RequestOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appmaxprice: uint256 -dataset: address -datasetmaxprice: uint256 -workerpool: address -workerpoolmaxprice: uint256 -requester: address -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -beneficiary: address -callback: address -params: string -salt: bytes32 -sign: bytes - - - -29->57 - - - - - -37 - -<<Library>> -IexecLibCore_v5 -contracts/libs/IexecLibCore_v5.sol - - - -53 - -<<Struct>> -EIP712Domain -contracts/libs/IexecLibOrders_v5.sol - -name: string -version: string -chainId: uint256 -verifyingContract: address - - - -51->53 - - - - - -51->54 - - - - - -51->55 - - - - - -51->56 - - - - - -51->57 - - + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +31->57 + + 58 - -<<Struct>> -AppOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: AppOrder -operation: OrderOperationEnum -sign: bytes - - - -51->58 - - + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +31->58 + + 59 - -<<Struct>> -DatasetOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: DatasetOrder -operation: OrderOperationEnum -sign: bytes - - + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + + +31->59 + + + + + +39 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol + + + +55 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + + +53->55 + + + + + +53->56 + + + + -51->59 - - +53->57 + + + + + +53->58 + + + + + +53->59 + + 60 - -<<Struct>> -WorkerpoolOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: WorkerpoolOrder -operation: OrderOperationEnum -sign: bytes - - - -51->60 - - + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + + +53->60 + + 61 - -<<Struct>> -RequestOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: RequestOrder -operation: OrderOperationEnum -sign: bytes - - - -51->61 - - - - - -52 - -<<Enum>> -OrderOperationEnum -contracts/libs/IexecLibOrders_v5.sol - -SIGN: 0 -CLOSE: 1 - - - -52->51 - - - - - -53->51 - - + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + + +53->61 + + - - -54->51 - - + + +62 + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +53->62 + + - - -55->51 - - + + +63 + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +53->63 + + - + + +54 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + -56->51 - - +54->53 + + - + -57->51 - - +55->53 + + - + -58->51 - - - - - -58->52 - - +56->53 + + - - -58->54 - - - - + -59->51 - - +57->53 + + - - -59->52 - - + + +58->53 + + - - -59->55 - - + + +59->53 + + - - -60->51 - - + + +60->53 + + - + -60->52 - - +60->54 + + 60->56 - - + + - - -61->51 - - + + +61->53 + + - + -61->52 - - +61->54 + + 61->57 - - + + + + + +62->53 + + - + -62->63 - - +62->54 + + - - -63->27 - - + + +62->58 + + - - -63->37 - - + + +63->53 + + - - -63->62 - - + + +63->54 + + - - -64 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool - - + -63->64 - - +63->59 + + + + + +64->65 + + + + + +65->29 + + + + + +65->39 + + + + + +65->64 + + + + + +66 + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool + + + +65->66 + + diff --git a/docs/uml/class-uml-IexecPocoBoostFacet.svg b/docs/uml/class-uml-IexecPocoBoostFacet.svg index 73bdaf8f..b951ad11 100644 --- a/docs/uml/class-uml-IexecPocoBoostFacet.svg +++ b/docs/uml/class-uml-IexecPocoBoostFacet.svg @@ -4,880 +4,911 @@ - - + + UmlClassDiagram - + 3 - -<<Abstract>> -FacetBase -contracts/abstract/FacetBase.sol - -Internal: -   CONTRIBUTION_DEADLINE_RATIO: uint256 -   REVEAL_DEADLINE_RATIO: uint256 -   FINAL_DEADLINE_RATIO: uint256 -   WORKERPOOL_STAKE_RATIO: uint256 -   KITTY_RATIO: uint256 -   KITTY_MIN: uint256 -   KITTY_ADDRESS: address -   GROUPMEMBER_PURPOSE: uint256 - -Internal: -    owner(): address -    _msgSender(): address -Public: -    <<modifier>> onlyOwner() + +<<Abstract>> +FacetBase +contracts/abstract/FacetBase.sol + +Internal: +   CONTRIBUTION_DEADLINE_RATIO: uint256 +   REVEAL_DEADLINE_RATIO: uint256 +   FINAL_DEADLINE_RATIO: uint256 +   WORKERPOOL_STAKE_RATIO: uint256 +   KITTY_RATIO: uint256 +   KITTY_MIN: uint256 +   KITTY_ADDRESS: address +   GROUPMEMBER_PURPOSE: uint256 + +Internal: +    owner(): address +    _msgSender(): address +Public: +    <<modifier>> onlyOwner() 4 - -<<Abstract>> -IexecEscrow -contracts/abstract/IexecEscrow.sol - -Private: -    _transfer(from: address, to: address, value: uint256) -Internal: -    lock(account: address, value: uint256) -    unlock(account: address, value: uint256) -    reward(account: address, value: uint256, ref: bytes32) -    seize(account: address, value: uint256, ref: bytes32) -Public: -    <<event>> Transfer(from: address, to: address, value: uint256) -    <<event>> Lock(owner: address, amount: uint256) -    <<event>> Unlock(owner: address, amount: uint256) -    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) -    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + +<<Abstract>> +IexecEscrow +contracts/abstract/IexecEscrow.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) 4->3 - - + + - - -62 - -<<Library>> -PocoStorageLib -contracts/libs/PocoStorageLib.sol - -Private: -   POCO_STORAGE_LOCATION: bytes32 - -Internal: -    getPocoStorage(): ($: PocoStorage) - - + + +26 + +<<Interface>> +IexecERC20Events +contracts/interfaces/IexecERC20Events.sol + +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) + + -4->62 - - +4->26 + + - - -63 - -<<Struct>> -PocoStorage -contracts/libs/PocoStorageLib.sol - -m_appregistry: IRegistry -m_datasetregistry: IRegistry -m_workerpoolregistry: IRegistry -m_baseToken: IERC20 -m_name: string -m_symbol: string -m_decimals: uint8 -m_totalSupply: uint256 -m_balances: mapping(address=>uint256) -m_frozens: mapping(address=>uint256) -m_allowances: mapping(address=>mapping(address=>uint256)) -m_eip712DomainSeparator: bytes32 -m_presigned: mapping(bytes32=>address) -m_consumed: mapping(bytes32=>uint256) -m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) -m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) -m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) -m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) -m_workerScores: mapping(address=>uint256) -m_teebroker: address -m_callbackgas: uint256 -m_categories: IexecLibCore_v5.Category[] -m_v3_iexecHub: IexecHubV3Interface -m_v3_scoreImported: mapping(address=>bool) -m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) - - + + +27 + +<<Interface>> +IexecEscrowEvents +contracts/interfaces/IexecEscrowEvents.sol + +Public: +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + + -4->63 - - +4->27 + + + + + +64 + +<<Library>> +PocoStorageLib +contracts/libs/PocoStorageLib.sol + +Private: +   POCO_STORAGE_LOCATION: bytes32 + +Internal: +    getPocoStorage(): ($: PocoStorage) + + + +4->64 + + + + + +65 + +<<Struct>> +PocoStorage +contracts/libs/PocoStorageLib.sol + +m_appregistry: IRegistry +m_datasetregistry: IRegistry +m_workerpoolregistry: IRegistry +m_baseToken: IERC20 +m_name: string +m_symbol: string +m_decimals: uint8 +m_totalSupply: uint256 +m_balances: mapping(address=>uint256) +m_frozens: mapping(address=>uint256) +m_allowances: mapping(address=>mapping(address=>uint256)) +m_eip712DomainSeparator: bytes32 +m_presigned: mapping(bytes32=>address) +m_consumed: mapping(bytes32=>uint256) +m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) +m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) +m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) +m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) +m_workerScores: mapping(address=>uint256) +m_teebroker: address +m_callbackgas: uint256 +m_categories: IexecLibCore_v5.Category[] +m_v3_iexecHub: IexecHubV3Interface +m_v3_scoreImported: mapping(address=>bool) +m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) + + + +4->65 + + 5 - -<<Abstract>> -IexecPocoCommon -contracts/abstract/IexecPocoCommon.sol - -Internal: -    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 + +<<Abstract>> +IexecPocoCommon +contracts/abstract/IexecPocoCommon.sol + +Internal: +    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 - + 5->3 - - + + - - -51 - -<<Library>> -IexecLibOrders_v5 -contracts/libs/IexecLibOrders_v5.sol - -Public: -   EIP712DOMAIN_TYPEHASH: bytes32 -   APPORDER_TYPEHASH: bytes32 -   DATASETORDER_TYPEHASH: bytes32 -   WORKERPOOLORDER_TYPEHASH: bytes32 -   REQUESTORDER_TYPEHASH: bytes32 -   APPORDEROPERATION_TYPEHASH: bytes32 -   DATASETORDEROPERATION_TYPEHASH: bytes32 -   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 -   REQUESTORDEROPERATION_TYPEHASH: bytes32 - -Public: -    hash(_domain: EIP712Domain): (domainhash: bytes32) -    hash(_apporder: AppOrder): (apphash: bytes32) -    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) -    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) -    hash(_requestorder: RequestOrder): (requesthash: bytes32) -    hash(_apporderoperation: AppOrderOperation): bytes32 -    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 -    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 -    hash(_requestorderoperation: RequestOrderOperation): bytes32 - - - -5->51 - - + + +53 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +5->53 + + - - -5->62 - - + + +5->64 + + - - -5->63 - - + + +5->65 + + 6 - -<<Abstract>> -SignatureVerifier -contracts/abstract/SignatureVerifier.sol - -Internal: -    _toTypedDataHash(structHash: bytes32): bytes32 -    _verifySignatureOfEthSignedMessage(account: address, message: bytes, signature: bytes): bool -    _verifySignature(account: address, messageHash: bytes32, signature: bytes): bool -    _verifyPresignature(account: address, messageHash: bytes32): bool -    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool -    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool + +<<Abstract>> +SignatureVerifier +contracts/abstract/SignatureVerifier.sol + +Internal: +    _toTypedDataHash(structHash: bytes32): bytes32 +    _verifySignatureOfEthSignedMessage(account: address, message: bytes, signature: bytes): bool +    _verifySignature(account: address, messageHash: bytes32, signature: bytes): bool +    _verifyPresignature(account: address, messageHash: bytes32): bool +    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool +    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool - + 6->3 - - + + - - -6->62 - - + + +6->64 + + - - -6->63 - - + + +6->65 + + - + -68 - -<<Interface>> -IOracleConsumer -contracts/external/interfaces/IOracleConsumer.sol - -External: -     receiveResult(taskId: bytes32, resultsCallback: bytes) +70 + +<<Interface>> +IOracleConsumer +contracts/external/interfaces/IOracleConsumer.sol + +External: +     receiveResult(taskId: bytes32, resultsCallback: bytes) 18 - -IexecPocoBoostFacet -contracts/facets/IexecPocoBoostFacet.sol - -Private: -    _matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder, sponsor: address): bytes32 -    requireTaskExistsAndUnset(taskStatus: IexecLibCore_v5.TaskStatusEnum, taskIndex: uint256, botSize: uint16) -External: -    matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 -    sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 -    pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) -    claimBoost(dealId: bytes32, index: uint256) + +IexecPocoBoostFacet +contracts/facets/IexecPocoBoostFacet.sol + +Private: +    _matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder, sponsor: address): bytes32 +    requireTaskExistsAndUnset(taskStatus: IexecLibCore_v5.TaskStatusEnum, taskIndex: uint256, botSize: uint16) +External: +    matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +    sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +    pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) +    claimBoost(dealId: bytes32, index: uint256) - + 18->3 - - + + - + 18->4 - - + + - + 18->5 - - + + - + 18->6 - - - - - -18->68 - - - - - -33 - -<<Interface>> -IexecPocoBoost -contracts/interfaces/IexecPocoBoost.sol - -External: -     matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 -     sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 -     pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) -     claimBoost(dealId: bytes32, index: uint256) -Public: -    <<event>> SchedulerNoticeBoost(workerpool: address, dealId: bytes32, app: address, dataset: address, category: uint256, tag: bytes32, params: string, beneficiary: address) -    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) -    <<event>> ResultPushedBoost(dealId: bytes32, index: uint256, results: bytes) -    <<event>> TaskClaimed(taskid: bytes32) -    <<event>> DealSponsoredBoost(dealId: bytes32, sponsor: address) - - - -18->33 - - + + - - -37 - -<<Library>> -IexecLibCore_v5 -contracts/libs/IexecLibCore_v5.sol - - - -18->37 - - + + +18->70 + + - + -45 - -<<Struct>> -DealBoost -contracts/libs/IexecLibCore_v5.sol - -appOwner: address -appPrice: uint96 -datasetOwner: address -datasetPrice: uint96 -workerpoolOwner: address -workerpoolPrice: uint96 -requester: address -workerReward: uint96 -callback: address -deadline: uint40 -botFirst: uint16 -botSize: uint16 -shortTag: bytes3 -sponsor: address - - - -18->45 - - +35 + +<<Interface>> +IexecPocoBoost +contracts/interfaces/IexecPocoBoost.sol + +External: +     matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +     pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) +     claimBoost(dealId: bytes32, index: uint256) +Public: +    <<event>> SchedulerNoticeBoost(workerpool: address, dealId: bytes32, app: address, dataset: address, category: uint256, tag: bytes32, params: string, beneficiary: address) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> ResultPushedBoost(dealId: bytes32, index: uint256, results: bytes) +    <<event>> TaskClaimed(taskid: bytes32) +    <<event>> DealSponsoredBoost(dealId: bytes32, sponsor: address) + + + +18->35 + + - + -46 - -<<Enum>> -TaskStatusEnum -contracts/libs/IexecLibCore_v5.sol - -UNSET: 0 -ACTIVE: 1 -REVEALING: 2 -COMPLETED: 3 -FAILED: 4 - - - -18->46 - - +39 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol + + + +18->39 + + 47 - -<<Struct>> -Task -contracts/libs/IexecLibCore_v5.sol - -status: TaskStatusEnum -dealid: bytes32 -idx: uint256 -timeref: uint256 -contributionDeadline: uint256 -revealDeadline: uint256 -finalDeadline: uint256 -consensusValue: bytes32 -revealCounter: uint256 -winnerCounter: uint256 -contributors: address[] -resultDigest: bytes32 -results: bytes -resultsTimestamp: uint256 -resultsCallback: bytes + +<<Struct>> +DealBoost +contracts/libs/IexecLibCore_v5.sol + +appOwner: address +appPrice: uint96 +datasetOwner: address +datasetPrice: uint96 +workerpoolOwner: address +workerpoolPrice: uint96 +requester: address +workerReward: uint96 +callback: address +deadline: uint40 +botFirst: uint16 +botSize: uint16 +shortTag: bytes3 +sponsor: address 18->47 - - + + - - -18->51 - - + + +48 + +<<Enum>> +TaskStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +ACTIVE: 1 +REVEALING: 2 +COMPLETED: 3 +FAILED: 4 + + + +18->48 + + - - -54 - -<<Struct>> -AppOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appprice: uint256 -volume: uint256 -tag: bytes32 -datasetrestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - - -18->54 - - + + +49 + +<<Struct>> +Task +contracts/libs/IexecLibCore_v5.sol + +status: TaskStatusEnum +dealid: bytes32 +idx: uint256 +timeref: uint256 +contributionDeadline: uint256 +revealDeadline: uint256 +finalDeadline: uint256 +consensusValue: bytes32 +revealCounter: uint256 +winnerCounter: uint256 +contributors: address[] +resultDigest: bytes32 +results: bytes +resultsTimestamp: uint256 +resultsCallback: bytes + + + +18->49 + + - - -55 - -<<Struct>> -DatasetOrder -contracts/libs/IexecLibOrders_v5.sol - -dataset: address -datasetprice: uint256 -volume: uint256 -tag: bytes32 -apprestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - + -18->55 - - +18->53 + + 56 - -<<Struct>> -WorkerpoolOrder -contracts/libs/IexecLibOrders_v5.sol - -workerpool: address -workerpoolprice: uint256 -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -apprestrict: address -datasetrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes 18->56 - - + + 57 - -<<Struct>> -RequestOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appmaxprice: uint256 -dataset: address -datasetmaxprice: uint256 -workerpool: address -workerpoolmaxprice: uint256 -requester: address -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -beneficiary: address -callback: address -params: string -salt: bytes32 -sign: bytes + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes 18->57 - - + + - + + +58 + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + -18->62 - - +18->58 + + - + + +59 + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + -18->63 - - +18->59 + + - - -79 - -<<Interface>> -IWorkerpool -contracts/registries/workerpools/IWorkerpool.v8.sol - -External: -     owner(): address -     m_workerpoolDescription(): string -     m_schedulerRewardRatioPolicy(): uint256 -     m_workerStakeRatioPolicy(): uint256 - - - -18->79 - - - - - -27 - -<<Interface>> -IexecHubV3Interface -contracts/interfaces/IexecHubV3Interface.sol - -External: -     viewScore(worker: address): uint256 - - - -33->51 - - + + +18->64 + + - - -33->54 - - + + +18->65 + + + + + +81 + +<<Interface>> +IWorkerpool +contracts/registries/workerpools/IWorkerpool.v8.sol + +External: +     owner(): address +     m_workerpoolDescription(): string +     m_schedulerRewardRatioPolicy(): uint256 +     m_workerStakeRatioPolicy(): uint256 + + + +18->81 + + - + + +29 + +<<Interface>> +IexecHubV3Interface +contracts/interfaces/IexecHubV3Interface.sol + +External: +     viewScore(worker: address): uint256 + + -33->55 - - +35->53 + + - + -33->56 - - +35->56 + + - + -33->57 - - - - - -45->37 - - +35->57 + + - + -46->37 - - +35->58 + + - - -47->37 - - + + +35->59 + + - + -47->46 - - +47->39 + + - - -53 - -<<Struct>> -EIP712Domain -contracts/libs/IexecLibOrders_v5.sol - -name: string -version: string -chainId: uint256 -verifyingContract: address - - - -51->53 - - + + +48->39 + + - - -51->54 - - + + +49->39 + + + + + +49->48 + + - + + +55 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + -51->55 - - +53->55 + + - + -51->56 - - +53->56 + + - + -51->57 - - +53->57 + + - - -58 - -<<Struct>> -AppOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: AppOrder -operation: OrderOperationEnum -sign: bytes - - + -51->58 - - +53->58 + + - - -59 - -<<Struct>> -DatasetOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: DatasetOrder -operation: OrderOperationEnum -sign: bytes - - + -51->59 - - +53->59 + + 60 - -<<Struct>> -WorkerpoolOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: WorkerpoolOrder -operation: OrderOperationEnum -sign: bytes - - + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + -51->60 - - +53->60 + + 61 - -<<Struct>> -RequestOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: RequestOrder -operation: OrderOperationEnum -sign: bytes - - + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + -51->61 - - +53->61 + + - - -52 - -<<Enum>> -OrderOperationEnum -contracts/libs/IexecLibOrders_v5.sol - -SIGN: 0 -CLOSE: 1 - - - -52->51 - - + + +62 + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +53->62 + + - - -53->51 - - + + +63 + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +53->63 + + - + + +54 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + -54->51 - - +54->53 + + - + -55->51 - - +55->53 + + - + -56->51 - - +56->53 + + - + -57->51 - - +57->53 + + - + -58->51 - - +58->53 + + - - -58->52 - - - - - -58->54 - - - - + -59->51 - - +59->53 + + + + + +60->53 + + - + -59->52 - - +60->54 + + - + -59->55 - - +60->56 + + - - -60->51 - - + + +61->53 + + - + -60->52 - - +61->54 + + - + -60->56 - - +61->57 + + - - -61->51 - - + + +62->53 + + - + -61->52 - - +62->54 + + - + -61->57 - - - - - -62->63 - - +62->58 + + - - -63->27 - - + + +63->53 + + - - -63->37 - - + + +63->54 + + - + -63->62 - - +63->59 + + - - -64 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool - - + + +64->65 + + + + + +65->29 + + + + + +65->39 + + + + -63->64 - - +65->64 + + + + + +66 + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool + + + +65->66 + + diff --git a/docs/uml/class-uml-IexecPocoFacets.svg b/docs/uml/class-uml-IexecPocoFacets.svg index 8c4f6070..12c36931 100644 --- a/docs/uml/class-uml-IexecPocoFacets.svg +++ b/docs/uml/class-uml-IexecPocoFacets.svg @@ -4,1102 +4,1133 @@ - + UmlClassDiagram - + 3 - -<<Abstract>> -FacetBase -contracts/abstract/FacetBase.sol - -Internal: -   CONTRIBUTION_DEADLINE_RATIO: uint256 -   REVEAL_DEADLINE_RATIO: uint256 -   FINAL_DEADLINE_RATIO: uint256 -   WORKERPOOL_STAKE_RATIO: uint256 -   KITTY_RATIO: uint256 -   KITTY_MIN: uint256 -   KITTY_ADDRESS: address -   GROUPMEMBER_PURPOSE: uint256 - -Internal: -    owner(): address -    _msgSender(): address -Public: -    <<modifier>> onlyOwner() + +<<Abstract>> +FacetBase +contracts/abstract/FacetBase.sol + +Internal: +   CONTRIBUTION_DEADLINE_RATIO: uint256 +   REVEAL_DEADLINE_RATIO: uint256 +   FINAL_DEADLINE_RATIO: uint256 +   WORKERPOOL_STAKE_RATIO: uint256 +   KITTY_RATIO: uint256 +   KITTY_MIN: uint256 +   KITTY_ADDRESS: address +   GROUPMEMBER_PURPOSE: uint256 + +Internal: +    owner(): address +    _msgSender(): address +Public: +    <<modifier>> onlyOwner() 4 - -<<Abstract>> -IexecEscrow -contracts/abstract/IexecEscrow.sol - -Private: -    _transfer(from: address, to: address, value: uint256) -Internal: -    lock(account: address, value: uint256) -    unlock(account: address, value: uint256) -    reward(account: address, value: uint256, ref: bytes32) -    seize(account: address, value: uint256, ref: bytes32) -Public: -    <<event>> Transfer(from: address, to: address, value: uint256) -    <<event>> Lock(owner: address, amount: uint256) -    <<event>> Unlock(owner: address, amount: uint256) -    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) -    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + +<<Abstract>> +IexecEscrow +contracts/abstract/IexecEscrow.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) 4->3 - - + + - - -62 - -<<Library>> -PocoStorageLib -contracts/libs/PocoStorageLib.sol - -Private: -   POCO_STORAGE_LOCATION: bytes32 - -Internal: -    getPocoStorage(): ($: PocoStorage) - - + + +26 + +<<Interface>> +IexecERC20Events +contracts/interfaces/IexecERC20Events.sol + +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) + + -4->62 - - +4->26 + + - - -63 - -<<Struct>> -PocoStorage -contracts/libs/PocoStorageLib.sol - -m_appregistry: IRegistry -m_datasetregistry: IRegistry -m_workerpoolregistry: IRegistry -m_baseToken: IERC20 -m_name: string -m_symbol: string -m_decimals: uint8 -m_totalSupply: uint256 -m_balances: mapping(address=>uint256) -m_frozens: mapping(address=>uint256) -m_allowances: mapping(address=>mapping(address=>uint256)) -m_eip712DomainSeparator: bytes32 -m_presigned: mapping(bytes32=>address) -m_consumed: mapping(bytes32=>uint256) -m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) -m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) -m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) -m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) -m_workerScores: mapping(address=>uint256) -m_teebroker: address -m_callbackgas: uint256 -m_categories: IexecLibCore_v5.Category[] -m_v3_iexecHub: IexecHubV3Interface -m_v3_scoreImported: mapping(address=>bool) -m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) - - + + +27 + +<<Interface>> +IexecEscrowEvents +contracts/interfaces/IexecEscrowEvents.sol + +Public: +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + + -4->63 - - +4->27 + + + + + +64 + +<<Library>> +PocoStorageLib +contracts/libs/PocoStorageLib.sol + +Private: +   POCO_STORAGE_LOCATION: bytes32 + +Internal: +    getPocoStorage(): ($: PocoStorage) + + + +4->64 + + + + + +65 + +<<Struct>> +PocoStorage +contracts/libs/PocoStorageLib.sol + +m_appregistry: IRegistry +m_datasetregistry: IRegistry +m_workerpoolregistry: IRegistry +m_baseToken: IERC20 +m_name: string +m_symbol: string +m_decimals: uint8 +m_totalSupply: uint256 +m_balances: mapping(address=>uint256) +m_frozens: mapping(address=>uint256) +m_allowances: mapping(address=>mapping(address=>uint256)) +m_eip712DomainSeparator: bytes32 +m_presigned: mapping(bytes32=>address) +m_consumed: mapping(bytes32=>uint256) +m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) +m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) +m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) +m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) +m_workerScores: mapping(address=>uint256) +m_teebroker: address +m_callbackgas: uint256 +m_categories: IexecLibCore_v5.Category[] +m_v3_iexecHub: IexecHubV3Interface +m_v3_scoreImported: mapping(address=>bool) +m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) + + + +4->65 + + 5 - -<<Abstract>> -IexecPocoCommon -contracts/abstract/IexecPocoCommon.sol - -Internal: -    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 + +<<Abstract>> +IexecPocoCommon +contracts/abstract/IexecPocoCommon.sol + +Internal: +    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 - + 5->3 - - + + - - -51 - -<<Library>> -IexecLibOrders_v5 -contracts/libs/IexecLibOrders_v5.sol - -Public: -   EIP712DOMAIN_TYPEHASH: bytes32 -   APPORDER_TYPEHASH: bytes32 -   DATASETORDER_TYPEHASH: bytes32 -   WORKERPOOLORDER_TYPEHASH: bytes32 -   REQUESTORDER_TYPEHASH: bytes32 -   APPORDEROPERATION_TYPEHASH: bytes32 -   DATASETORDEROPERATION_TYPEHASH: bytes32 -   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 -   REQUESTORDEROPERATION_TYPEHASH: bytes32 - -Public: -    hash(_domain: EIP712Domain): (domainhash: bytes32) -    hash(_apporder: AppOrder): (apphash: bytes32) -    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) -    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) -    hash(_requestorder: RequestOrder): (requesthash: bytes32) -    hash(_apporderoperation: AppOrderOperation): bytes32 -    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 -    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 -    hash(_requestorderoperation: RequestOrderOperation): bytes32 - - - -5->51 - - + + +53 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +5->53 + + - - -5->62 - - + + +5->64 + + - - -5->63 - - + + +5->65 + + 6 - -<<Abstract>> -SignatureVerifier -contracts/abstract/SignatureVerifier.sol - -Internal: -    _toTypedDataHash(structHash: bytes32): bytes32 -    _verifySignatureOfEthSignedMessage(account: address, message: bytes, signature: bytes): bool -    _verifySignature(account: address, messageHash: bytes32, signature: bytes): bool -    _verifyPresignature(account: address, messageHash: bytes32): bool -    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool -    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool + +<<Abstract>> +SignatureVerifier +contracts/abstract/SignatureVerifier.sol + +Internal: +    _toTypedDataHash(structHash: bytes32): bytes32 +    _verifySignatureOfEthSignedMessage(account: address, message: bytes, signature: bytes): bool +    _verifySignature(account: address, messageHash: bytes32, signature: bytes): bool +    _verifyPresignature(account: address, messageHash: bytes32): bool +    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool +    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool - + 6->3 - - + + - - -6->62 - - + + +6->64 + + - - -6->63 - - + + +6->65 + + 13 - -<<Struct>> -Matching -contracts/facets/IexecPoco1Facet.sol - -apporderHash: bytes32 -appOwner: address -datasetorderHash: bytes32 -datasetOwner: address -workerpoolorderHash: bytes32 -workerpoolOwner: address -requestorderHash: bytes32 -hasDataset: bool + +<<Struct>> +Matching +contracts/facets/IexecPoco1Facet.sol + +apporderHash: bytes32 +appOwner: address +datasetorderHash: bytes32 +datasetOwner: address +workerpoolorderHash: bytes32 +workerpoolOwner: address +requestorderHash: bytes32 +hasDataset: bool 14 - -IexecPoco1Facet -contracts/facets/IexecPoco1Facet.sol - -Private: -    _matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder, _sponsor: address): bytes32 -    _ignoreTeeFramework(tag: bytes32): bytes32 -External: -    verifySignature(_identity: address, _hash: bytes32, _signature: bytes): bool -    verifyPresignature(_identity: address, _hash: bytes32): bool -    verifyPresignatureOrSignature(_identity: address, _hash: bytes32, _signature: bytes): bool -    assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) -    matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 -    sponsorMatchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 + +IexecPoco1Facet +contracts/facets/IexecPoco1Facet.sol + +Private: +    _matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder, _sponsor: address): bytes32 +    _ignoreTeeFramework(tag: bytes32): bytes32 +External: +    verifySignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    verifyPresignature(_identity: address, _hash: bytes32): bool +    verifyPresignatureOrSignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) +    matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 +    sponsorMatchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 - + 14->3 - - + + - + 14->4 - - + + - + 14->5 - - + + - + 14->6 - - + + - + 14->13 - - - - - -29 - -<<Interface>> -IexecPoco1 -contracts/interfaces/IexecPoco1.sol - -External: -     verifySignature(address, bytes32, bytes): bool -     verifyPresignature(address, bytes32): bool -     verifyPresignatureOrSignature(address, bytes32, bytes): bool -     assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) -     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 -     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 -Public: -    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) -    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) -    <<event>> DealSponsored(dealId: bytes32, sponsor: address) - - - -14->29 - - + + - - -30 - -<<Interface>> -IexecPoco1Errors -contracts/interfaces/IexecPoco1Errors.sol - - - -14->30 - - + + +31 + +<<Interface>> +IexecPoco1 +contracts/interfaces/IexecPoco1.sol + +External: +     verifySignature(address, bytes32, bytes): bool +     verifyPresignature(address, bytes32): bool +     verifyPresignatureOrSignature(address, bytes32, bytes): bool +     assertDatasetDealCompatibility(datasetOrder: IexecLibOrders_v5.DatasetOrder, dealId: bytes32) +     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> DealSponsored(dealId: bytes32, sponsor: address) + + + +14->31 + + - + -37 - -<<Library>> -IexecLibCore_v5 -contracts/libs/IexecLibCore_v5.sol +32 + +<<Interface>> +IexecPoco1Errors +contracts/interfaces/IexecPoco1Errors.sol - - -14->37 - - + + +14->32 + + - + -44 - -<<Struct>> -Deal -contracts/libs/IexecLibCore_v5.sol - -app: Resource -dataset: Resource -workerpool: Resource -trust: uint256 -category: uint256 -tag: bytes32 -requester: address -beneficiary: address -callback: address -params: string -startTime: uint256 -botFirst: uint256 -botSize: uint256 -workerStake: uint256 -schedulerRewardRatio: uint256 -sponsor: address - - - -14->44 - - - - - -14->51 - - +39 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol - - -54 - -<<Struct>> -AppOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appprice: uint256 -volume: uint256 -tag: bytes32 -datasetrestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - + -14->54 - - +14->39 + + - - -55 - -<<Struct>> -DatasetOrder -contracts/libs/IexecLibOrders_v5.sol - -dataset: address -datasetprice: uint256 -volume: uint256 -tag: bytes32 -apprestrict: address -workerpoolrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes - - - -14->55 - - + + +46 + +<<Struct>> +Deal +contracts/libs/IexecLibCore_v5.sol + +app: Resource +dataset: Resource +workerpool: Resource +trust: uint256 +category: uint256 +tag: bytes32 +requester: address +beneficiary: address +callback: address +params: string +startTime: uint256 +botFirst: uint256 +botSize: uint256 +workerStake: uint256 +schedulerRewardRatio: uint256 +sponsor: address + + + +14->46 + + + + + +14->53 + + 56 - -<<Struct>> -WorkerpoolOrder -contracts/libs/IexecLibOrders_v5.sol - -workerpool: address -workerpoolprice: uint256 -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -apprestrict: address -datasetrestrict: address -requesterrestrict: address -salt: bytes32 -sign: bytes + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes - + 14->56 - - + + 57 - -<<Struct>> -RequestOrder -contracts/libs/IexecLibOrders_v5.sol - -app: address -appmaxprice: uint256 -dataset: address -datasetmaxprice: uint256 -workerpool: address -workerpoolmaxprice: uint256 -requester: address -volume: uint256 -tag: bytes32 -category: uint256 -trust: uint256 -beneficiary: address -callback: address -params: string -salt: bytes32 -sign: bytes + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes - + 14->57 - - - - - -14->62 - - + + - - -14->63 - - + + +58 + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +14->58 + + - - -79 - -<<Interface>> -IWorkerpool -contracts/registries/workerpools/IWorkerpool.v8.sol - -External: -     owner(): address -     m_workerpoolDescription(): string -     m_schedulerRewardRatioPolicy(): uint256 -     m_workerStakeRatioPolicy(): uint256 - - + + +59 + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + -14->79 - - +14->59 + + + + + +14->64 + + + + + +14->65 + + + + + +81 + +<<Interface>> +IWorkerpool +contracts/registries/workerpools/IWorkerpool.v8.sol + +External: +     owner(): address +     m_workerpoolDescription(): string +     m_schedulerRewardRatioPolicy(): uint256 +     m_workerStakeRatioPolicy(): uint256 + + + +14->81 + + 15 - -IexecPoco2Facet -contracts/facets/IexecPoco2Facet.sol - -Internal: -    successWork(_dealid: bytes32, _taskid: bytes32) -    failedWork(_dealid: bytes32, _taskid: bytes32) -    checkConsensus(_taskid: bytes32, _consensus: bytes32) -    distributeRewards(_taskid: bytes32) -    distributeRewardsFast(_taskid: bytes32) -    executeCallback(_taskid: bytes32, _resultsCallback: bytes) -External: -    contribute(_taskid: bytes32, _resultHash: bytes32, _resultSeal: bytes32, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) -    contributeAndFinalize(_taskid: bytes32, _resultDigest: bytes32, _results: bytes, _resultsCallback: bytes, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) -    reveal(_taskid: bytes32, _resultDigest: bytes32) -    reopen(_taskid: bytes32) <<onlyScheduler>> -    finalize(_taskid: bytes32, _results: bytes, _resultsCallback: bytes) <<onlyScheduler>> -    initializeArray(_dealid: bytes32[], _idx: uint256[]): bool -    claimArray(_taskid: bytes32[]): bool -    initializeAndClaimArray(_dealid: bytes32[], _idx: uint256[]): bool -Public: -    <<modifier>> onlyScheduler(_taskId: bytes32) -    initialize(_dealid: bytes32, idx: uint256): bytes32 -    claim(_taskid: bytes32) + +IexecPoco2Facet +contracts/facets/IexecPoco2Facet.sol + +Internal: +    successWork(_dealid: bytes32, _taskid: bytes32) +    failedWork(_dealid: bytes32, _taskid: bytes32) +    checkConsensus(_taskid: bytes32, _consensus: bytes32) +    distributeRewards(_taskid: bytes32) +    distributeRewardsFast(_taskid: bytes32) +    executeCallback(_taskid: bytes32, _resultsCallback: bytes) +External: +    contribute(_taskid: bytes32, _resultHash: bytes32, _resultSeal: bytes32, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) +    contributeAndFinalize(_taskid: bytes32, _resultDigest: bytes32, _results: bytes, _resultsCallback: bytes, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) +    reveal(_taskid: bytes32, _resultDigest: bytes32) +    reopen(_taskid: bytes32) <<onlyScheduler>> +    finalize(_taskid: bytes32, _results: bytes, _resultsCallback: bytes) <<onlyScheduler>> +    initializeArray(_dealid: bytes32[], _idx: uint256[]): bool +    claimArray(_taskid: bytes32[]): bool +    initializeAndClaimArray(_dealid: bytes32[], _idx: uint256[]): bool +Public: +    <<modifier>> onlyScheduler(_taskId: bytes32) +    initialize(_dealid: bytes32, idx: uint256): bytes32 +    claim(_taskid: bytes32) - + 15->3 - - + + - + 15->4 - - + + - + 15->6 - - - - - -31 - -<<Interface>> -IexecPoco2 -contracts/interfaces/IexecPoco2.sol - -External: -     initialize(dealId: bytes32, index: uint256): bytes32 -     claim(taskId: bytes32) -     contribute(taskId: bytes32, resultHash: bytes32, resultSeal: bytes32, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) -     contributeAndFinalize(taskId: bytes32, resultDigest: bytes32, results: bytes, resultsCallback: bytes, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) -     reveal(taskId: bytes32, resultDigest: bytes32) -     reopen(taskId: bytes32) -     finalize(taskId: bytes32, results: bytes, resultsCallback: bytes) -     initializeArray(dealIds: bytes32[], indexes: uint256[]): bool -     claimArray(taskIds: bytes32[]): bool -     initializeAndClaimArray(dealIds: bytes32[], indexes: uint256[]): bool -Public: -    <<event>> AccurateContribution(worker: address, taskid: bytes32) -    <<event>> FaultyContribution(worker: address, taskid: bytes32) -    <<event>> TaskInitialize(taskid: bytes32, workerpool: address) -    <<event>> TaskContribute(taskid: bytes32, worker: address, hash: bytes32) -    <<event>> TaskConsensus(taskid: bytes32, consensus: bytes32) -    <<event>> TaskReveal(taskid: bytes32, worker: address, digest: bytes32) -    <<event>> TaskReopen(taskid: bytes32) -    <<event>> TaskFinalize(taskid: bytes32, results: bytes) -    <<event>> TaskClaimed(taskid: bytes32) - - - -15->31 - - - - - -15->37 - - + + - - -15->44 - - + + +33 + +<<Interface>> +IexecPoco2 +contracts/interfaces/IexecPoco2.sol + +External: +     initialize(dealId: bytes32, index: uint256): bytes32 +     claim(taskId: bytes32) +     contribute(taskId: bytes32, resultHash: bytes32, resultSeal: bytes32, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) +     contributeAndFinalize(taskId: bytes32, resultDigest: bytes32, results: bytes, resultsCallback: bytes, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) +     reveal(taskId: bytes32, resultDigest: bytes32) +     reopen(taskId: bytes32) +     finalize(taskId: bytes32, results: bytes, resultsCallback: bytes) +     initializeArray(dealIds: bytes32[], indexes: uint256[]): bool +     claimArray(taskIds: bytes32[]): bool +     initializeAndClaimArray(dealIds: bytes32[], indexes: uint256[]): bool +Public: +    <<event>> AccurateContribution(worker: address, taskid: bytes32) +    <<event>> FaultyContribution(worker: address, taskid: bytes32) +    <<event>> TaskInitialize(taskid: bytes32, workerpool: address) +    <<event>> TaskContribute(taskid: bytes32, worker: address, hash: bytes32) +    <<event>> TaskConsensus(taskid: bytes32, consensus: bytes32) +    <<event>> TaskReveal(taskid: bytes32, worker: address, digest: bytes32) +    <<event>> TaskReopen(taskid: bytes32) +    <<event>> TaskFinalize(taskid: bytes32, results: bytes) +    <<event>> TaskClaimed(taskid: bytes32) + + + +15->33 + + - - -47 - -<<Struct>> -Task -contracts/libs/IexecLibCore_v5.sol - -status: TaskStatusEnum -dealid: bytes32 -idx: uint256 -timeref: uint256 -contributionDeadline: uint256 -revealDeadline: uint256 -finalDeadline: uint256 -consensusValue: bytes32 -revealCounter: uint256 -winnerCounter: uint256 -contributors: address[] -resultDigest: bytes32 -results: bytes -resultsTimestamp: uint256 -resultsCallback: bytes - - + -15->47 - - +15->39 + + - - -48 - -<<Struct>> -Consensus -contracts/libs/IexecLibCore_v5.sol - -group: mapping(bytes32=>uint256) -total: uint256 - - + + +15->46 + + + + + +49 + +<<Struct>> +Task +contracts/libs/IexecLibCore_v5.sol + +status: TaskStatusEnum +dealid: bytes32 +idx: uint256 +timeref: uint256 +contributionDeadline: uint256 +revealDeadline: uint256 +finalDeadline: uint256 +consensusValue: bytes32 +revealCounter: uint256 +winnerCounter: uint256 +contributors: address[] +resultDigest: bytes32 +results: bytes +resultsTimestamp: uint256 +resultsCallback: bytes + + -15->48 - - +15->49 + + 50 - -<<Struct>> -Contribution -contracts/libs/IexecLibCore_v5.sol - -status: ContributionStatusEnum -resultHash: bytes32 -resultSeal: bytes32 -enclaveChallenge: address -weight: uint256 + +<<Struct>> +Consensus +contracts/libs/IexecLibCore_v5.sol + +group: mapping(bytes32=>uint256) +total: uint256 - + 15->50 - - - - - -15->62 - - - - - -15->63 - - + + - - -27 - -<<Interface>> -IexecHubV3Interface -contracts/interfaces/IexecHubV3Interface.sol - -External: -     viewScore(worker: address): uint256 - - + + +52 + +<<Struct>> +Contribution +contracts/libs/IexecLibCore_v5.sol + +status: ContributionStatusEnum +resultHash: bytes32 +resultSeal: bytes32 +enclaveChallenge: address +weight: uint256 + + -29->51 - - +15->52 + + - - -29->54 - - + + +15->64 + + - - -29->55 - - + + +15->65 + + - - -29->56 - - + + +29 + +<<Interface>> +IexecHubV3Interface +contracts/interfaces/IexecHubV3Interface.sol + +External: +     viewScore(worker: address): uint256 + + + +31->53 + + - + -29->57 - - +31->56 + + - - -43 - -<<Struct>> -Resource -contracts/libs/IexecLibCore_v5.sol - -pointer: address -owner: address -price: uint256 - - - -43->37 - - + + +31->57 + + - - -44->37 - - + + +31->58 + + - - -44->43 - - + + +31->59 + + - + -46 - -<<Enum>> -TaskStatusEnum -contracts/libs/IexecLibCore_v5.sol - -UNSET: 0 -ACTIVE: 1 -REVEALING: 2 -COMPLETED: 3 -FAILED: 4 - - - -46->37 - - - - +45 + +<<Struct>> +Resource +contracts/libs/IexecLibCore_v5.sol + +pointer: address +owner: address +price: uint256 + + -47->37 - - - - - -47->46 - - +45->39 + + - + -48->37 - - +46->39 + + - - -49 - -<<Enum>> -ContributionStatusEnum -contracts/libs/IexecLibCore_v5.sol - -UNSET: 0 -CONTRIBUTED: 1 -PROVED: 2 -REJECTED: 3 - - - -49->37 - - + + +46->45 + + + + + +48 + +<<Enum>> +TaskStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +ACTIVE: 1 +REVEALING: 2 +COMPLETED: 3 +FAILED: 4 + + + +48->39 + + - + -50->37 - - +49->39 + + - - -50->49 - - + + +49->48 + + - - -53 - -<<Struct>> -EIP712Domain -contracts/libs/IexecLibOrders_v5.sol - -name: string -version: string -chainId: uint256 -verifyingContract: address - - - -51->53 - - + + +50->39 + + - - -51->54 - - + + +51 + +<<Enum>> +ContributionStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +CONTRIBUTED: 1 +PROVED: 2 +REJECTED: 3 + + + +51->39 + + - + + +52->39 + + + + + +52->51 + + + + + +55 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + -51->55 - - +53->55 + + - + -51->56 - - +53->56 + + - + -51->57 - - +53->57 + + - - -58 - -<<Struct>> -AppOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: AppOrder -operation: OrderOperationEnum -sign: bytes - - + -51->58 - - +53->58 + + - - -59 - -<<Struct>> -DatasetOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: DatasetOrder -operation: OrderOperationEnum -sign: bytes - - + -51->59 - - +53->59 + + 60 - -<<Struct>> -WorkerpoolOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: WorkerpoolOrder -operation: OrderOperationEnum -sign: bytes - - + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + -51->60 - - +53->60 + + 61 - -<<Struct>> -RequestOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: RequestOrder -operation: OrderOperationEnum -sign: bytes - - + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + -51->61 - - - - - -52 - -<<Enum>> -OrderOperationEnum -contracts/libs/IexecLibOrders_v5.sol - -SIGN: 0 -CLOSE: 1 +53->61 + + - - -52->51 - - + + +62 + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +53->62 + + - - -53->51 - - + + +63 + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +53->63 + + - + + +54 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + -54->51 - - +54->53 + + - + -55->51 - - +55->53 + + - + -56->51 - - +56->53 + + - + -57->51 - - +57->53 + + - + -58->51 - - - - - -58->52 - - - - - -58->54 - - +58->53 + + - + -59->51 - - +59->53 + + + + + +60->53 + + - + -59->52 - - +60->54 + + - + -59->55 - - +60->56 + + - - -60->51 - - + + +61->53 + + - + -60->52 - - +61->54 + + - + -60->56 - - +61->57 + + - - -61->51 - - + + +62->53 + + - + -61->52 - - +62->54 + + - + -61->57 - - +62->58 + + - - -62->63 - - - - - -63->27 - - + + +63->53 + + - - -63->37 - - + + +63->54 + + - + -63->62 - - +63->59 + + - - -64 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool - - + + +64->65 + + + + + +65->29 + + + + + +65->39 + + + + -63->64 - - +65->64 + + + + + +66 + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool + + + +65->66 + + diff --git a/scripts/verify.ts b/scripts/verify.ts index 90713b7c..eca75dcf 100644 --- a/scripts/verify.ts +++ b/scripts/verify.ts @@ -12,7 +12,7 @@ import { Deployment } from 'hardhat-deploy/dist/types'; * will verify all contracts from the deployments/{network} directory. */ async function verify(contractNames?: string[]): Promise { - const skippedNetworks: string[] = ['hardhat', 'localhost', 'external-hardhat', 'dev-token']; + const skippedNetworks: string[] = ['hardhat', 'localhost', 'external-hardhat']; if (skippedNetworks.includes(hre.network.name)) { console.log(`\nSkipping verification on development network: ${hre.network.name}`); return;