diff --git a/abis/contracts/abstract/IexecEscrow.json b/abis/contracts/abstract/IexecEscrow.json index f8f92b4b0..0c2a6141e 100644 --- a/abis/contracts/abstract/IexecEscrow.json +++ b/abis/contracts/abstract/IexecEscrow.json @@ -1,4 +1,29 @@ [ + { + "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": [ diff --git a/abis/contracts/facets/IexecPoco1Facet.json b/abis/contracts/facets/IexecPoco1Facet.json index ea52d0f77..04119f496 100644 --- a/abis/contracts/facets/IexecPoco1Facet.json +++ b/abis/contracts/facets/IexecPoco1Facet.json @@ -10,6 +10,31 @@ "name": "IncompatibleDatasetOrder", "type": "error" }, + { + "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": [ diff --git a/abis/contracts/facets/IexecPoco2Facet.json b/abis/contracts/facets/IexecPoco2Facet.json index e379af17d..c5dd7eb13 100644 --- a/abis/contracts/facets/IexecPoco2Facet.json +++ b/abis/contracts/facets/IexecPoco2Facet.json @@ -23,6 +23,31 @@ "name": "AccurateContribution", "type": "event" }, + { + "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": [ diff --git a/abis/contracts/facets/IexecPocoBoostFacet.json b/abis/contracts/facets/IexecPocoBoostFacet.json index 753f46048..f4e8ddc06 100644 --- a/abis/contracts/facets/IexecPocoBoostFacet.json +++ b/abis/contracts/facets/IexecPocoBoostFacet.json @@ -15,6 +15,31 @@ "name": "SafeCastOverflowedUintDowncast", "type": "error" }, + { + "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": [ diff --git a/abis/contracts/interfaces/IexecERC20.json b/abis/contracts/interfaces/IexecERC20.json deleted file mode 100644 index 5d001c922..000000000 --- a/abis/contracts/interfaces/IexecERC20.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": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/abis/contracts/interfaces/IexecEscrowEvents.json b/abis/contracts/interfaces/IexecEscrowEvents.json new file mode 100644 index 000000000..0c2a6141e --- /dev/null +++ b/abis/contracts/interfaces/IexecEscrowEvents.json @@ -0,0 +1,140 @@ +[ + { + "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" + } +] diff --git a/abis/contracts/interfaces/IexecEscrowToken.json b/abis/contracts/interfaces/IexecEscrowToken.json index 48147e2bd..9796f8cf1 100644 --- a/abis/contracts/interfaces/IexecEscrowToken.json +++ b/abis/contracts/interfaces/IexecEscrowToken.json @@ -20,10 +20,225 @@ "name": "UnsupportedOperation", "type": "error" }, + { + "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" + }, { "stateMutability": "payable", "type": "fallback" }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -91,6 +306,30 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "recover", @@ -104,6 +343,59 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { diff --git a/abis/human-readable-abis/contracts/abstract/IexecEscrow.sol/IexecEscrow.json b/abis/human-readable-abis/contracts/abstract/IexecEscrow.sol/IexecEscrow.json index 1c6711547..ca70d06c7 100644 --- a/abis/human-readable-abis/contracts/abstract/IexecEscrow.sol/IexecEscrow.json +++ b/abis/human-readable-abis/contracts/abstract/IexecEscrow.sol/IexecEscrow.json @@ -1,4 +1,5 @@ [ + "event Approval(address indexed,address indexed,uint256)", "event Lock(address,uint256)", "event Reward(address,uint256,bytes32)", "event Seize(address,uint256,bytes32)", diff --git a/abis/human-readable-abis/contracts/facets/IexecPoco1Facet.sol/IexecPoco1Facet.json b/abis/human-readable-abis/contracts/facets/IexecPoco1Facet.sol/IexecPoco1Facet.json index 6797588d0..4cd2ca141 100644 --- a/abis/human-readable-abis/contracts/facets/IexecPoco1Facet.sol/IexecPoco1Facet.json +++ b/abis/human-readable-abis/contracts/facets/IexecPoco1Facet.sol/IexecPoco1Facet.json @@ -1,5 +1,6 @@ [ "error IncompatibleDatasetOrder(string)", + "event Approval(address indexed,address indexed,uint256)", "event DealSponsored(bytes32,address)", "event Lock(address,uint256)", "event OrdersMatched(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)", diff --git a/abis/human-readable-abis/contracts/facets/IexecPoco2Facet.sol/IexecPoco2Facet.json b/abis/human-readable-abis/contracts/facets/IexecPoco2Facet.sol/IexecPoco2Facet.json index 19ef5ebb3..00476c8a4 100644 --- a/abis/human-readable-abis/contracts/facets/IexecPoco2Facet.sol/IexecPoco2Facet.json +++ b/abis/human-readable-abis/contracts/facets/IexecPoco2Facet.sol/IexecPoco2Facet.json @@ -1,6 +1,7 @@ [ "error MathOverflowedMulDiv()", "event AccurateContribution(address indexed,bytes32 indexed)", + "event Approval(address indexed,address indexed,uint256)", "event FaultyContribution(address indexed,bytes32 indexed)", "event Lock(address,uint256)", "event Reward(address,uint256,bytes32)", diff --git a/abis/human-readable-abis/contracts/facets/IexecPocoBoostFacet.sol/IexecPocoBoostFacet.json b/abis/human-readable-abis/contracts/facets/IexecPocoBoostFacet.sol/IexecPocoBoostFacet.json index a9b60c326..c6025282e 100644 --- a/abis/human-readable-abis/contracts/facets/IexecPocoBoostFacet.sol/IexecPocoBoostFacet.json +++ b/abis/human-readable-abis/contracts/facets/IexecPocoBoostFacet.sol/IexecPocoBoostFacet.json @@ -1,5 +1,6 @@ [ "error SafeCastOverflowedUintDowncast(uint8,uint256)", + "event Approval(address indexed,address indexed,uint256)", "event DealSponsoredBoost(bytes32,address)", "event Lock(address,uint256)", "event OrdersMatched(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)", diff --git a/abis/human-readable-abis/contracts/interfaces/IexecERC20.sol/IexecERC20.json b/abis/human-readable-abis/contracts/interfaces/IexecERC20.sol/IexecERC20.json deleted file mode 100644 index a6b4632da..000000000 --- a/abis/human-readable-abis/contracts/interfaces/IexecERC20.sol/IexecERC20.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/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 000000000..ca70d06c7 --- /dev/null +++ b/abis/human-readable-abis/contracts/interfaces/IexecEscrowEvents.sol/IexecEscrowEvents.json @@ -0,0 +1,8 @@ +[ + "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)" +] 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 4fb79f919..b1d2b9e51 100644 --- a/abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json +++ b/abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json @@ -2,10 +2,22 @@ "error CallerIsNotTheRequester()", "error OperationFailed()", "error UnsupportedOperation(bytes4)", + "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 deposit(uint256) returns (bool)", "function depositFor(uint256,address) returns (bool)", "function depositForArray(uint256[],address[]) returns (bool)", + "function increaseAllowance(address,uint256) returns (bool)", "function recover() returns (uint256)", + "function transfer(address,uint256) returns (bool)", + "function transferFrom(address,address,uint256) returns (bool)", "function withdraw(uint256) returns (bool)", "function withdrawTo(uint256,address) returns (bool)" ] diff --git a/abis/human-readable-abis/contracts/tools/testing/IexecEscrowTestContract.sol/IexecEscrowTestContract.json b/abis/human-readable-abis/contracts/tools/testing/IexecEscrowTestContract.sol/IexecEscrowTestContract.json index 8ba4f7fbf..a52f7811a 100644 --- a/abis/human-readable-abis/contracts/tools/testing/IexecEscrowTestContract.sol/IexecEscrowTestContract.json +++ b/abis/human-readable-abis/contracts/tools/testing/IexecEscrowTestContract.sol/IexecEscrowTestContract.json @@ -1,4 +1,5 @@ [ + "event Approval(address indexed,address indexed,uint256)", "event Lock(address,uint256)", "event Reward(address,uint256,bytes32)", "event Seize(address,uint256,bytes32)", diff --git a/abis/human-readable-abis/contracts/tools/testing/IexecPocoBoostCompositeFacet.sol/IexecPocoBoostCompositeFacet.json b/abis/human-readable-abis/contracts/tools/testing/IexecPocoBoostCompositeFacet.sol/IexecPocoBoostCompositeFacet.json index c05089d16..7570d62e0 100644 --- a/abis/human-readable-abis/contracts/tools/testing/IexecPocoBoostCompositeFacet.sol/IexecPocoBoostCompositeFacet.json +++ b/abis/human-readable-abis/contracts/tools/testing/IexecPocoBoostCompositeFacet.sol/IexecPocoBoostCompositeFacet.json @@ -1,5 +1,6 @@ [ "error SafeCastOverflowedUintDowncast(uint8,uint256)", + "event Approval(address indexed,address indexed,uint256)", "event DealSponsoredBoost(bytes32,address)", "event Lock(address,uint256)", "event OrdersMatched(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)", diff --git a/abis/human-readable-abis/contracts/tools/testing/slither/Slither.sol/Slither.json b/abis/human-readable-abis/contracts/tools/testing/slither/Slither.sol/Slither.json index 64a34952a..a96ed7baf 100644 --- a/abis/human-readable-abis/contracts/tools/testing/slither/Slither.sol/Slither.json +++ b/abis/human-readable-abis/contracts/tools/testing/slither/Slither.sol/Slither.json @@ -2,6 +2,7 @@ "error IncompatibleDatasetOrder(string)", "error MathOverflowedMulDiv()", "event AccurateContribution(address indexed,bytes32 indexed)", + "event Approval(address indexed,address indexed,uint256)", "event DealSponsored(bytes32,address)", "event FaultyContribution(address indexed,bytes32 indexed)", "event Lock(address,uint256)", diff --git a/abis/human-readable-abis/contracts/tools/testing/slither/SlitherBoost.sol/SlitherBoost.json b/abis/human-readable-abis/contracts/tools/testing/slither/SlitherBoost.sol/SlitherBoost.json index 02b2f7a96..b5161b0f3 100644 --- a/abis/human-readable-abis/contracts/tools/testing/slither/SlitherBoost.sol/SlitherBoost.json +++ b/abis/human-readable-abis/contracts/tools/testing/slither/SlitherBoost.sol/SlitherBoost.json @@ -1,5 +1,6 @@ [ "error SafeCastOverflowedUintDowncast(uint8,uint256)", + "event Approval(address indexed,address indexed,uint256)", "event DealSponsoredBoost(bytes32,address)", "event Lock(address,uint256)", "event OrdersMatched(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)", diff --git a/contracts/IexecInterfaceToken.sol b/contracts/IexecInterfaceToken.sol index d6fa8b3f0..2d0803981 100644 --- a/contracts/IexecInterfaceToken.sol +++ b/contracts/IexecInterfaceToken.sol @@ -7,7 +7,6 @@ import {IexecAccessorsABILegacy} from "./interfaces/IexecAccessorsABILegacy.sol" import {IexecCategoryManager} from "./interfaces/IexecCategoryManager.sol"; import {IexecConfiguration} from "./interfaces/IexecConfiguration.sol"; import {IexecConfigurationExtra} from "./interfaces/IexecConfigurationExtra.sol"; -import {IexecERC20} from "./interfaces/IexecERC20.sol"; import {IexecEscrowToken} from "./interfaces/IexecEscrowToken.sol"; import {IexecOrderManagement} from "./interfaces/IexecOrderManagement.sol"; import {IexecPoco1} from "./interfaces/IexecPoco1.sol"; @@ -35,7 +34,6 @@ interface IexecInterfaceToken is IexecCategoryManager, IexecConfiguration, IexecConfigurationExtra, - IexecERC20, IexecEscrowToken, IexecOrderManagement, IexecPoco1, diff --git a/contracts/abstract/IexecEscrow.sol b/contracts/abstract/IexecEscrow.sol index 1654f0d96..3a51fadaf 100644 --- a/contracts/abstract/IexecEscrow.sol +++ b/contracts/abstract/IexecEscrow.sol @@ -3,18 +3,15 @@ pragma solidity ^0.8.0; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; +import {IexecEscrowEvents} from "../interfaces/IexecEscrowEvents.sol"; import {FacetBase} from "./FacetBase.sol"; +// TODO convert to library + /** * @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, IexecEscrowEvents { /** * Lock some value of an account. * @param account The account where the value should be locked. @@ -62,20 +59,35 @@ abstract contract IexecEscrow is FacetBase { emit Seize(account, value, ref); } + /** + * Reward an account and immediately lock the rewarded value. + * @notice Equivalent to `reward(account, value, ref)` followed by + * `lock(account, value)`, without the two transfers that would move the value + * from the proxy to the account and straight back to the proxy. + * @param account The account to reward and lock. + * @param value The value to reward then lock. + * @param ref A reference of the reward context. + */ + function rewardAndLock(address account, uint256 value, bytes32 ref) internal { + PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); + $.m_frozens[account] += value; + emit Reward(account, value, ref); + emit Lock(account, value); + } + /** * Transfer value from a spender account to a receiver account. * @notice - * This function does not check for self-transfers - * because its current usage does not require such verification. - * Indeed, all operations that use this function are always between - * the proxy contract and another actor of the platform (requester, - * owner of dataset/application/workerpool). + * This is the single implementation of an sRLC balance move. It backs both + * the escrow operations declared below (lock, unlock, reward) and the ERC-20 + * entry points of {IexecEscrowTokenFacet}. + * A self-transfer is a no-op on the balances and is not rejected. * * @param from The address of the spender account. * @param to The address of the receiver account. * @param value The value to transfer. */ - function _transfer(address from, address to, uint256 value) private { + function _transfer(address from, address to, uint256 value) internal { require(from != address(0), "IexecEscrow: Transfer from empty address"); require(to != address(0), "IexecEscrow: Transfer to empty address"); PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); diff --git a/contracts/abstract/IexecPocoCommon.sol b/contracts/abstract/IexecPocoCommon.sol index 5206bc13f..ca596aade 100644 --- a/contracts/abstract/IexecPocoCommon.sol +++ b/contracts/abstract/IexecPocoCommon.sol @@ -8,6 +8,7 @@ import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; import {FacetBase} from "./FacetBase.sol"; +// TODO convert to library abstract contract IexecPocoCommon is FacetBase { using Math for uint256; using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; diff --git a/contracts/abstract/SignatureVerifier.sol b/contracts/abstract/SignatureVerifier.sol index e42724b61..b7d9e2211 100644 --- a/contracts/abstract/SignatureVerifier.sol +++ b/contracts/abstract/SignatureVerifier.sol @@ -10,6 +10,7 @@ import {FacetBase} from "./FacetBase.sol"; import {IERC734} from "../external/interfaces/IERC734.sol"; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; +// TODO convert to library abstract contract SignatureVerifier is FacetBase { using ECDSA for bytes32; diff --git a/contracts/facets/IexecEscrowTokenFacet.sol b/contracts/facets/IexecEscrowTokenFacet.sol index c49b907bf..cbc21929a 100644 --- a/contracts/facets/IexecEscrowTokenFacet.sol +++ b/contracts/facets/IexecEscrowTokenFacet.sol @@ -4,16 +4,28 @@ pragma solidity ^0.8.0; import {FacetBase} from "../abstract/FacetBase.sol"; -import {IexecERC20} from "../interfaces/IexecERC20.sol"; +import {IexecEscrow} from "../abstract/IexecEscrow.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, IexecERC20, FacetBase { +/** + * @title Escrow of the PoCo protocol and ERC-20 entry points of its internal token. + * @notice Deposits of the base RLC token are held by the proxy and credited 1:1 + * as sRLC (ERC20 "Staked RLC"), managed by this facet manages. sRLC is not a + * standalone contract: its balances, allowances and total supply live in the PoCo + * storage, and every account that funds a deal, stakes as a worker or collects a + * reward is paid in it. + * + * `deposit` mints sRLC against transferred RLC, `withdraw` burns it and returns the + * RLC, and the ERC-20 methods move it between accounts. The balance moves of the + * escrow itself (lock, unlock, reward, seize) run over the same ledger. + */ +contract IexecEscrowTokenFacet is IexecEscrowToken, IexecTokenSpender, IexecEscrow { /*************************************************************************** - * Escrow methods: public * + * Deposit and withdraw functions * ***************************************************************************/ receive() external payable override { revert("fallback-disabled"); @@ -260,19 +272,6 @@ contract IexecEscrowTokenFacet is IexecEscrowToken, IexecTokenSpender, IexecERC2 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(); - $.m_balances[sender] = $.m_balances[sender] - 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(); diff --git a/contracts/facets/IexecOrderManagementFacet.sol b/contracts/facets/IexecOrderManagementFacet.sol index 7df901e55..aac00b7da 100644 --- a/contracts/facets/IexecOrderManagementFacet.sol +++ b/contracts/facets/IexecOrderManagementFacet.sol @@ -4,13 +4,12 @@ pragma solidity ^0.8.0; import {IERC5313} from "@openzeppelin/contracts/interfaces/IERC5313.sol"; -import {FacetBase} from "../abstract/FacetBase.sol"; import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; import {IexecOrderManagement} from "../interfaces/IexecOrderManagement.sol"; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; -contract IexecOrderManagementFacet is IexecOrderManagement, FacetBase, SignatureVerifier { +contract IexecOrderManagementFacet is IexecOrderManagement, SignatureVerifier { using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; diff --git a/contracts/facets/IexecPoco1Facet.sol b/contracts/facets/IexecPoco1Facet.sol index 79fb4c44c..fc49c5244 100644 --- a/contracts/facets/IexecPoco1Facet.sol +++ b/contracts/facets/IexecPoco1Facet.sol @@ -8,7 +8,6 @@ import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {IexecLibCore_v5} from "../libs/IexecLibCore_v5.sol"; import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; import {IWorkerpool} from "../registries/workerpools/IWorkerpool.v8.sol"; -import {FacetBase} from "../abstract/FacetBase.sol"; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; import {IexecPoco1} from "../interfaces/IexecPoco1.sol"; import {IexecPoco1Errors} from "../interfaces/IexecPoco1Errors.sol"; @@ -30,7 +29,6 @@ struct Matching { contract IexecPoco1Facet is IexecPoco1, IexecPoco1Errors, - FacetBase, IexecEscrow, SignatureVerifier, IexecPocoCommon diff --git a/contracts/facets/IexecPoco2Facet.sol b/contracts/facets/IexecPoco2Facet.sol index 79d8987e0..9028615e9 100644 --- a/contracts/facets/IexecPoco2Facet.sol +++ b/contracts/facets/IexecPoco2Facet.sol @@ -8,12 +8,11 @@ import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; import {IOracleConsumer} from "../external/interfaces/IOracleConsumer.sol"; import {IexecLibCore_v5} from "../libs/IexecLibCore_v5.sol"; import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; -import {FacetBase} from "../abstract/FacetBase.sol"; import {IexecPoco2} from "../interfaces/IexecPoco2.sol"; import {IexecEscrow} from "../abstract/IexecEscrow.sol"; import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; -contract IexecPoco2Facet is IexecPoco2, FacetBase, IexecEscrow, SignatureVerifier { +contract IexecPoco2Facet is IexecPoco2, IexecEscrow, SignatureVerifier { modifier onlyScheduler(bytes32 _taskId) { PocoStorageLib.PocoStorage storage $ = PocoStorageLib.getPocoStorage(); require(_msgSender() == $.m_deals[$.m_tasks[_taskId].dealid].workerpool.owner); @@ -63,15 +62,8 @@ contract IexecPoco2Facet is IexecPoco2, FacetBase, IexecEscrow, SignatureVerifie unlock(deal.sponsor, taskPrice); // Refund the payer of the task seize(deal.workerpool.owner, poolstake, _taskid); - /** - * Reward kitty and lock value on it. - * Next lines optimize simple `reward(kitty, ..)` and `lock(kitty, ..)` calls - * where functions would together uselessly transfer value from main PoCo - * proxy to kitty, then would transfer value back from kitty to main PoCo proxy. - */ - $.m_frozens[KITTY_ADDRESS] += poolstake; // → Kitty / Burn - emit Reward(KITTY_ADDRESS, poolstake, _taskid); - emit Lock(KITTY_ADDRESS, poolstake); + // Reward kitty and lock value on it. + rewardAndLock(KITTY_ADDRESS, poolstake, _taskid); // → Kitty / Burn } /*************************************************************************** diff --git a/contracts/facets/IexecPocoAccessorsFacet.sol b/contracts/facets/IexecPocoAccessorsFacet.sol index faac59fd0..1a8a5b40e 100644 --- a/contracts/facets/IexecPocoAccessorsFacet.sol +++ b/contracts/facets/IexecPocoAccessorsFacet.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.0; import {PocoStorageLib} from "../libs/PocoStorageLib.sol"; -import {FacetBase} from "../abstract/FacetBase.sol"; import {IexecLibCore_v5} from "../libs/IexecLibCore_v5.sol"; import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; import {IDataset} from "../registries/datasets/IDataset.v8.sol"; @@ -18,12 +17,7 @@ import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; /** * @title Getters contract for PoCo facets. */ -contract IexecPocoAccessorsFacet is - IexecPocoAccessors, - FacetBase, - SignatureVerifier, - IexecPocoCommon -{ +contract IexecPocoAccessorsFacet is IexecPocoAccessors, SignatureVerifier, IexecPocoCommon { using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; diff --git a/contracts/facets/IexecPocoBoostFacet.sol b/contracts/facets/IexecPocoBoostFacet.sol index 86fce216d..e7b5d5b10 100644 --- a/contracts/facets/IexecPocoBoostFacet.sol +++ b/contracts/facets/IexecPocoBoostFacet.sol @@ -13,7 +13,6 @@ import {IOracleConsumer} from "../external/interfaces/IOracleConsumer.sol"; import {IexecLibCore_v5} from "../libs/IexecLibCore_v5.sol"; import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol"; import {IWorkerpool} from "../registries/workerpools/IWorkerpool.v8.sol"; -import {FacetBase} from "../abstract/FacetBase.sol"; import {IexecPocoBoost} from "../interfaces/IexecPocoBoost.sol"; import {IexecEscrow} from "../abstract/IexecEscrow.sol"; import {IexecPocoCommon} from "../abstract/IexecPocoCommon.sol"; @@ -28,13 +27,7 @@ import {SignatureVerifier} from "../abstract/SignatureVerifier.sol"; * @title PoCo Boost to reduce latency and increase throughput of deals. * @notice Works for deals with requested trust = 0. */ -contract IexecPocoBoostFacet is - IexecPocoBoost, - FacetBase, - IexecEscrow, - SignatureVerifier, - IexecPocoCommon -{ +contract IexecPocoBoostFacet is IexecPocoBoost, IexecEscrow, SignatureVerifier, IexecPocoCommon { using ECDSA for bytes32; using MessageHashUtils for bytes32; using Math for uint256; @@ -518,10 +511,7 @@ contract IexecPocoBoostFacet is // Seize task stake from workerpool. seize(deal.workerpoolOwner, workerpoolTaskStake, taskId); // Reward kitty and lock the rewarded amount. - $.m_frozens[KITTY_ADDRESS] += workerpoolTaskStake; - // Emit events to publish state changes. - emit Reward(KITTY_ADDRESS, workerpoolTaskStake, taskId); - emit Lock(KITTY_ADDRESS, workerpoolTaskStake); + rewardAndLock(KITTY_ADDRESS, workerpoolTaskStake, taskId); emit TaskClaimed(taskId); } diff --git a/contracts/interfaces/IexecERC20.sol b/contracts/interfaces/IexecERC20.sol deleted file mode 100644 index 9344174d6..000000000 --- a/contracts/interfaces/IexecERC20.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity ^0.8.0; - -interface IexecERC20 { - // ERC20 standard events - event Transfer(address indexed from, address indexed to, uint256 value); - 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); - function transferFrom(address, address, uint256) external returns (bool); - function increaseAllowance(address, uint256) external returns (bool); - function decreaseAllowance(address, uint256) external returns (bool); - function approveAndCall(address, uint256, bytes calldata) external returns (bool); -} diff --git a/contracts/interfaces/IexecEscrowEvents.sol b/contracts/interfaces/IexecEscrowEvents.sol new file mode 100644 index 000000000..97179105d --- /dev/null +++ b/contracts/interfaces/IexecEscrowEvents.sol @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: 2020-2025 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +/** + * @title Events emitted by the escrow. + * @dev Declared here so that the abstract escrow which emits them and the + * interface which publishes them share a single declaration. + */ +interface IexecEscrowEvents { + event Transfer(address indexed from, address indexed to, uint256 value); + event Approval(address indexed owner, address indexed spender, uint256 value); + 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); +} diff --git a/contracts/interfaces/IexecEscrowToken.sol b/contracts/interfaces/IexecEscrowToken.sol index 5d6e13218..5d0334198 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(); @@ -16,4 +18,11 @@ interface IexecEscrowToken { function withdraw(uint256) external returns (bool); function withdrawTo(uint256, address) external returns (bool); function recover() external returns (uint256); + + function transfer(address, uint256) external returns (bool); + function approve(address, uint256) external returns (bool); + function transferFrom(address, address, uint256) external returns (bool); + function increaseAllowance(address, uint256) external returns (bool); + function decreaseAllowance(address, uint256) external returns (bool); + function approveAndCall(address, uint256, bytes calldata) external returns (bool); } diff --git a/docs/solidity/index.md b/docs/solidity/index.md index 52e1af248..6734cf1c7 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 @@ -102,6 +72,16 @@ function setCallbackGas(uint256 _callbackgas) external ## IexecEscrowTokenFacet +Deposits of the base RLC token are held by the proxy and credited 1:1 +as sRLC (ERC20 "Staked RLC"), managed by this facet manages. sRLC is not a +standalone contract: its balances, allowances and total supply live in the PoCo +storage, and every account that funds a deal, stakes as a worker or collects a +reward is paid in it. + +`deposit` mints sRLC against transferred RLC, `withdraw` burns it and returns the +RLC, and the ERC-20 methods move it between accounts. The balance moves of the +escrow itself (lock, unlock, reward, seize) run over the same ledger. + ### receive ```solidity diff --git a/docs/uml/class-uml-IexecEscrows.svg b/docs/uml/class-uml-IexecEscrows.svg index 82d94656b..e96b334d3 100644 --- a/docs/uml/class-uml-IexecEscrows.svg +++ b/docs/uml/class-uml-IexecEscrows.svg @@ -4,711 +4,708 @@ - - + + 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 + +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) +    rewardAndLock(account: address, value: uint256, ref: bytes32) +    _transfer(from: address, to: address, value: uint256) 4->3 - - + + + + + +25 + +<<Interface>> +IexecEscrowEvents +contracts/interfaces/IexecEscrowEvents.sol + +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->25 + + 62 - -<<Library>> -PocoStorageLib -contracts/libs/PocoStorageLib.sol - -Private: -   POCO_STORAGE_LOCATION: bytes32 - -Internal: -    getPocoStorage(): ($: PocoStorage) + +<<Library>> +PocoStorageLib +contracts/libs/PocoStorageLib.sol + +Private: +   POCO_STORAGE_LOCATION: bytes32 + +Internal: +    getPocoStorage(): ($: PocoStorage) - + 4->62 - - + + 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) + +<<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 - - + + 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) +    _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) - - - -11->25 - - +11->4 + + 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 + +<<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 +     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 - + 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) + +<<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 - - + + 36 - -<<Interface>> -IexecTokenSpender -contracts/interfaces/IexecTokenSpender.sol - -External: -     receiveApproval(address, uint256, address, bytes): bool + +<<Interface>> +IexecTokenSpender +contracts/interfaces/IexecTokenSpender.sol + +External: +     receiveApproval(address, uint256, address, bytes): bool - + 11->36 - - + + 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 + +<<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 - - + + 11->62 - - + + 11->63 - - + + + + + +26->25 + + 27 - -<<Interface>> -IexecHubV3Interface -contracts/interfaces/IexecHubV3Interface.sol - -External: -     viewScore(worker: address): uint256 + +<<Interface>> +IexecHubV3Interface +contracts/interfaces/IexecHubV3Interface.sol + +External: +     viewScore(worker: address): uint256 - + 29->51 - - + + 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 + +<<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>> -DatasetOrder -contracts/libs/IexecLibOrders_v5.sol - -dataset: address -datasetprice: uint256 -volume: uint256 -tag: bytes32 -apprestrict: address -workerpoolrestrict: address -requesterrestrict: address -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 - + 29->55 - - + + 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>> +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>> -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>> +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 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol 53 - -<<Struct>> -EIP712Domain -contracts/libs/IexecLibOrders_v5.sol - -name: string -version: string -chainId: uint256 -verifyingContract: address + +<<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 - - + + 58 - -<<Struct>> -AppOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: AppOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes - + 51->58 - - + + 59 - -<<Struct>> -DatasetOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: DatasetOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes - + 51->59 - - + + 60 - -<<Struct>> -WorkerpoolOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: WorkerpoolOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes - + 51->60 - - + + 61 - -<<Struct>> -RequestOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: RequestOrder -operation: OrderOperationEnum -sign: bytes + +<<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 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 - + 52->51 - - + + - + 53->51 - - + + - + 54->51 - - + + - + 55->51 - - + + - + 56->51 - - + + - + 57->51 - - + + - + 58->51 - - + + - + 58->52 - - + + - + 58->54 - - + + - + 59->51 - - + + - + 59->52 - - + + - + 59->55 - - + + - + 60->51 - - + + - + 60->52 - - + + - + 60->56 - - + + - + 61->51 - - + + - + 61->52 - - + + - + 61->57 - - + + - + 62->63 - - + + - + 63->27 - - + + - + 63->37 - - + + - + 63->62 - - + + 64 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool - + 63->64 - - + + diff --git a/docs/uml/class-uml-IexecPocoBoostFacet.svg b/docs/uml/class-uml-IexecPocoBoostFacet.svg index 73bdaf8f4..55a6dcefd 100644 --- a/docs/uml/class-uml-IexecPocoBoostFacet.svg +++ b/docs/uml/class-uml-IexecPocoBoostFacet.svg @@ -4,880 +4,890 @@ - - + + 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 + +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) +    rewardAndLock(account: address, value: uint256, ref: bytes32) +    _transfer(from: address, to: address, value: uint256) 4->3 - - + + + + + +25 + +<<Interface>> +IexecEscrowEvents +contracts/interfaces/IexecEscrowEvents.sol + +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->25 + + - + 62 - -<<Library>> -PocoStorageLib -contracts/libs/PocoStorageLib.sol - -Private: -   POCO_STORAGE_LOCATION: bytes32 - -Internal: -    getPocoStorage(): ($: PocoStorage) + +<<Library>> +PocoStorageLib +contracts/libs/PocoStorageLib.sol + +Private: +   POCO_STORAGE_LOCATION: bytes32 + +Internal: +    getPocoStorage(): ($: PocoStorage) - + 4->62 - - + + - + 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) + +<<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 - - + + 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 + +<<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 - - + + - + 5->62 - - + + - + 5->63 - - + + 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->63 - - + + 68 - -<<Interface>> -IOracleConsumer -contracts/external/interfaces/IOracleConsumer.sol - -External: -     receiveResult(taskId: bytes32, resultsCallback: bytes) + +<<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) - - - -18->3 - - + +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->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) + +<<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 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol 18->37 - - + + - + 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 + +<<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 - - + + - + 46 - -<<Enum>> -TaskStatusEnum -contracts/libs/IexecLibCore_v5.sol - -UNSET: 0 -ACTIVE: 1 -REVEALING: 2 -COMPLETED: 3 -FAILED: 4 + +<<Enum>> +TaskStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +ACTIVE: 1 +REVEALING: 2 +COMPLETED: 3 +FAILED: 4 18->46 - - + + - + 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>> +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->47 - - + + 18->51 - - + + - + 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 + +<<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 - - + + - + 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 + +<<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 - - + + - + 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>> +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->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>> +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->57 - - + + 18->62 - - + + 18->63 - - + + - + 79 - -<<Interface>> -IWorkerpool -contracts/registries/workerpools/IWorkerpool.v8.sol - -External: -     owner(): address -     m_workerpoolDescription(): string -     m_schedulerRewardRatioPolicy(): uint256 -     m_workerStakeRatioPolicy(): uint256 + +<<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 + +<<Interface>> +IexecHubV3Interface +contracts/interfaces/IexecHubV3Interface.sol + +External: +     viewScore(worker: address): uint256 33->51 - - + + 33->54 - - + + 33->55 - - + + 33->56 - - + + 33->57 - - + + 45->37 - - + + 46->37 - - + + 47->37 - - + + 47->46 - - + + - + 53 - -<<Struct>> -EIP712Domain -contracts/libs/IexecLibOrders_v5.sol - -name: string -version: string -chainId: uint256 -verifyingContract: address + +<<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 - - + + - + 58 - -<<Struct>> -AppOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: AppOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes 51->58 - - + + - + 59 - -<<Struct>> -DatasetOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: DatasetOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes 51->59 - - + + - + 60 - -<<Struct>> -WorkerpoolOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: WorkerpoolOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes 51->60 - - + + - + 61 - -<<Struct>> -RequestOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: RequestOrder -operation: OrderOperationEnum -sign: bytes + +<<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 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 52->51 - - + + 53->51 - - + + 54->51 - - + + 55->51 - - + + 56->51 - - + + 57->51 - - + + 58->51 - - + + 58->52 - - + + 58->54 - - + + 59->51 - - + + 59->52 - - + + 59->55 - - + + 60->51 - - + + 60->52 - - + + 60->56 - - + + 61->51 - - + + 61->52 - - + + 61->57 - - + + 62->63 - - + + 63->27 - - + + 63->37 - - + + 63->62 - - + + - + 64 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool 63->64 - - + + diff --git a/docs/uml/class-uml-IexecPocoFacets.svg b/docs/uml/class-uml-IexecPocoFacets.svg index 8c4f60704..2b01ae3df 100644 --- a/docs/uml/class-uml-IexecPocoFacets.svg +++ b/docs/uml/class-uml-IexecPocoFacets.svg @@ -4,1102 +4,1106 @@ - + 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 + +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) +    rewardAndLock(account: address, value: uint256, ref: bytes32) +    _transfer(from: address, to: address, value: uint256) 4->3 - - + + + + + +25 + +<<Interface>> +IexecEscrowEvents +contracts/interfaces/IexecEscrowEvents.sol + +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->25 + + - + 62 - -<<Library>> -PocoStorageLib -contracts/libs/PocoStorageLib.sol - -Private: -   POCO_STORAGE_LOCATION: bytes32 - -Internal: -    getPocoStorage(): ($: PocoStorage) + +<<Library>> +PocoStorageLib +contracts/libs/PocoStorageLib.sol + +Private: +   POCO_STORAGE_LOCATION: bytes32 + +Internal: +    getPocoStorage(): ($: PocoStorage) - + 4->62 - - + + - + 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) + +<<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 - - + + 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 + +<<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 - - + + - + 5->62 - - + + - + 5->63 - - + + 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->63 - - + + 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 - - - -14->3 - - + +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->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) + +<<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 + +<<Interface>> +IexecPoco1Errors +contracts/interfaces/IexecPoco1Errors.sol - + 14->30 - - + + - + 37 - -<<Library>> -IexecLibCore_v5 -contracts/libs/IexecLibCore_v5.sol + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol 14->37 - - + + - + 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 + +<<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 - - + + - + 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 + +<<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 - - + + - + 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 + +<<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 - - + + - + 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>> +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->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>> +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->57 - - + + 14->62 - - + + 14->63 - - + + - + 79 - -<<Interface>> -IWorkerpool -contracts/registries/workerpools/IWorkerpool.v8.sol - -External: -     owner(): address -     m_workerpoolDescription(): string -     m_schedulerRewardRatioPolicy(): uint256 -     m_workerStakeRatioPolicy(): uint256 + +<<Interface>> +IWorkerpool +contracts/registries/workerpools/IWorkerpool.v8.sol + +External: +     owner(): address +     m_workerpoolDescription(): string +     m_schedulerRewardRatioPolicy(): uint256 +     m_workerStakeRatioPolicy(): uint256 14->79 - - + + 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) - - - -15->3 - - + +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->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) + +<<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 - - + + - + 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>> +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 - - + + - + 48 - -<<Struct>> -Consensus -contracts/libs/IexecLibCore_v5.sol - -group: mapping(bytes32=>uint256) -total: uint256 + +<<Struct>> +Consensus +contracts/libs/IexecLibCore_v5.sol + +group: mapping(bytes32=>uint256) +total: uint256 - + 15->48 - - + + - + 50 - -<<Struct>> -Contribution -contracts/libs/IexecLibCore_v5.sol - -status: ContributionStatusEnum -resultHash: bytes32 -resultSeal: bytes32 -enclaveChallenge: address -weight: uint256 + +<<Struct>> +Contribution +contracts/libs/IexecLibCore_v5.sol + +status: ContributionStatusEnum +resultHash: bytes32 +resultSeal: bytes32 +enclaveChallenge: address +weight: uint256 - + 15->50 - - + + - + 15->62 - - + + - + 15->63 - - + + - + 27 - -<<Interface>> -IexecHubV3Interface -contracts/interfaces/IexecHubV3Interface.sol - -External: -     viewScore(worker: address): uint256 + +<<Interface>> +IexecHubV3Interface +contracts/interfaces/IexecHubV3Interface.sol + +External: +     viewScore(worker: address): uint256 - + 29->51 - - + + - + 29->54 - - + + - + 29->55 - - + + - + 29->56 - - + + - + 29->57 - - + + - + 43 - -<<Struct>> -Resource -contracts/libs/IexecLibCore_v5.sol - -pointer: address -owner: address -price: uint256 + +<<Struct>> +Resource +contracts/libs/IexecLibCore_v5.sol + +pointer: address +owner: address +price: uint256 - + 43->37 - - + + - + 44->37 - - + + - + 44->43 - - + + - + 46 - -<<Enum>> -TaskStatusEnum -contracts/libs/IexecLibCore_v5.sol - -UNSET: 0 -ACTIVE: 1 -REVEALING: 2 -COMPLETED: 3 -FAILED: 4 + +<<Enum>> +TaskStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +ACTIVE: 1 +REVEALING: 2 +COMPLETED: 3 +FAILED: 4 - + 46->37 - - + + - + 47->37 - - + + - + 47->46 - - + + - + 48->37 - - + + - + 49 - -<<Enum>> -ContributionStatusEnum -contracts/libs/IexecLibCore_v5.sol - -UNSET: 0 -CONTRIBUTED: 1 -PROVED: 2 -REJECTED: 3 + +<<Enum>> +ContributionStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +CONTRIBUTED: 1 +PROVED: 2 +REJECTED: 3 - + 49->37 - - + + - + 50->37 - - + + - + 50->49 - - + + - + 53 - -<<Struct>> -EIP712Domain -contracts/libs/IexecLibOrders_v5.sol - -name: string -version: string -chainId: uint256 -verifyingContract: address + +<<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 - - + + - + 58 - -<<Struct>> -AppOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: AppOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes - + 51->58 - - + + - + 59 - -<<Struct>> -DatasetOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: DatasetOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes - + 51->59 - - + + - + 60 - -<<Struct>> -WorkerpoolOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: WorkerpoolOrder -operation: OrderOperationEnum -sign: bytes + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes - + 51->60 - - + + - + 61 - -<<Struct>> -RequestOrderOperation -contracts/libs/IexecLibOrders_v5.sol - -order: RequestOrder -operation: OrderOperationEnum -sign: bytes + +<<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 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 - + 52->51 - - + + - + 53->51 - - + + - + 54->51 - - + + - + 55->51 - - + + - + 56->51 - - + + - + 57->51 - - + + - + 58->51 - - + + - + 58->52 - - + + - + 58->54 - - + + - + 59->51 - - + + - + 59->52 - - + + - + 59->55 - - + + - + 60->51 - - + + - + 60->52 - - + + - + 60->56 - - + + - + 61->51 - - + + - + 61->52 - - + + - + 61->57 - - + + - + 62->63 - - + + - + 63->27 - - + + - + 63->37 - - + + - + 63->62 - - + + - + 64 - -<<Interface>> -IRegistry -contracts/registries/IRegistry.sol - -External: -     isRegistered(_entry: address): bool + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool - + 63->64 - - + + diff --git a/docs/uml/class-uml-dir-facets.svg b/docs/uml/class-uml-dir-facets.svg index 98389597b..0809a3dd8 100644 --- a/docs/uml/class-uml-dir-facets.svg +++ b/docs/uml/class-uml-dir-facets.svg @@ -66,36 +66,34 @@ 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) -    _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: + +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) +    _mint(account: address, amount: uint256) +    _burn(account: address, amount: uint256) +    _approve(owner: address, spender: address, amount: uint256) +External: +    <<payable>> null()    <<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 +    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 diff --git a/docs/uml/class-uml-dir-registries.svg b/docs/uml/class-uml-dir-registries.svg index 725c4d488..15e3958e3 100644 --- a/docs/uml/class-uml-dir-registries.svg +++ b/docs/uml/class-uml-dir-registries.svg @@ -4,41 +4,40 @@ - - + + 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() + +<<Abstract>> +Registry +contracts/registries/Registry.sol + +Private: +   _baseUri: string +Public: +   master: address +   proxyCode: bytes +   proxyCodeHash: bytes32 +   previous: IRegistry +   initialized: bool + +Internal:    _mintCreate(_owner: address, _args: bytes): address    _mintPredict(_owner: address, _args: bytes): address    _baseURI(): string @@ -53,70 +52,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) -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 - - + + @@ -136,14 +135,14 @@ 4->1 - - + + 4->3 - - + + @@ -164,23 +163,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 - - + + @@ -200,14 +199,14 @@ 7->1 - - + + 7->6 - - + + @@ -226,65 +225,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() + +<<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 - - + + @@ -303,26 +302,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 - - + + @@ -342,14 +341,14 @@ 15->1 - - + + 15->14 - - + + diff --git a/test/byContract/IexecERC20/IexecERC20.test.ts b/test/byContract/IexecERC20/IexecERC20.test.ts index 85d30273e..26bfcd606 100644 --- a/test/byContract/IexecERC20/IexecERC20.test.ts +++ b/test/byContract/IexecERC20/IexecERC20.test.ts @@ -87,17 +87,17 @@ describe('ERC20', async () => { it('Should not transfer from the zero address', async () => { await expect( iexecPoco.connect(zeroAddressSigner).transfer(recipient.address, value), - ).to.be.revertedWith('ERC20: transfer from the zero address'); + ).to.be.revertedWith('IexecEscrow: Transfer from empty address'); }); it('Should not transfer to the zero address', async () => { await expect(iexecPocoAsHolder.transfer(ZeroAddress, value)).to.be.revertedWith( - 'ERC20: transfer to the zero address', + 'IexecEscrow: Transfer to empty address', ); }); it('Should not transfer when sender balance is too low', async () => { await expect( iexecPocoAsHolder.transfer(recipient.address, value + 1n), - ).to.be.revertedWithPanic(0x11); + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); }); }); @@ -191,17 +191,17 @@ describe('ERC20', async () => { it('Should not transferFrom when owner is the zero address', async () => { await expect( iexecPocoAsSpender.transferFrom(ZeroAddress, spender.address, value), - ).to.be.revertedWith('ERC20: transfer from the zero address'); + ).to.be.revertedWith('IexecEscrow: Transfer from empty address'); }); it('Should not transferFrom to the zero address', async () => { await expect( iexecPocoAsSpender.transferFrom(holder.address, ZeroAddress, value), - ).to.be.revertedWith('ERC20: transfer to the zero address'); + ).to.be.revertedWith('IexecEscrow: Transfer to empty address'); }); it('Should not transferFrom when owner balance is too low', async () => { await expect( iexecPocoAsSpender.transferFrom(holder.address, spender.address, value + 1n), - ).to.be.revertedWithPanic(0x11); + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); }); it('Should not transferFrom when spender allowance is too low', async () => { await iexecPocoAsHolder.approve(spender.address, value - 1n).then((tx) => tx.wait());