Tools
struct Account {
uint256 stake;
uint256 locked;
}
struct Category {
string name;
string description;
uint256 workClockTimeRef;
}
Clerk - Deals
struct Resource {
address pointer;
address owner;
uint256 price;
}
struct Deal {
struct IexecLibCore_v5.Resource app;
struct IexecLibCore_v5.Resource dataset;
struct IexecLibCore_v5.Resource workerpool;
uint256 trust;
uint256 category;
bytes32 tag;
address requester;
address beneficiary;
address callback;
string params;
uint256 startTime;
uint256 botFirst;
uint256 botSize;
uint256 workerStake;
uint256 schedulerRewardRatio;
address sponsor;
}
Simplified deals for PoCo Boost module.
struct DealBoost {
address appOwner;
uint96 appPrice;
address datasetOwner;
uint96 datasetPrice;
address workerpoolOwner;
uint96 workerpoolPrice;
address requester;
uint96 workerReward;
address callback;
uint40 deadline;
uint16 botFirst;
uint16 botSize;
bytes3 shortTag;
address sponsor;
}
Tasks
enum TaskStatusEnum {
UNSET,
ACTIVE,
REVEALING,
COMPLETED,
FAILED
}
struct Task {
enum IexecLibCore_v5.TaskStatusEnum status;
bytes32 dealid;
uint256 idx;
uint256 timeref;
uint256 contributionDeadline;
uint256 revealDeadline;
uint256 finalDeadline;
bytes32 consensusValue;
uint256 revealCounter;
uint256 winnerCounter;
address[] contributors;
bytes32 resultDigest;
bytes results;
uint256 resultsTimestamp;
bytes resultsCallback;
}
Consensus
struct Consensus {
mapping(bytes32 => uint256) group;
uint256 total;
}
Consensus
enum ContributionStatusEnum {
UNSET,
CONTRIBUTED,
PROVED,
REJECTED
}
struct Contribution {
enum IexecLibCore_v5.ContributionStatusEnum status;
bytes32 resultHash;
bytes32 resultSeal;
address enclaveChallenge;
uint256 weight;
}
bytes32 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
enum OrderOperationEnum {
SIGN,
CLOSE
}
struct EIP712Domain {
string name;
string version;
uint256 chainId;
address verifyingContract;
}
struct AppOrder {
address app;
uint256 appprice;
uint256 volume;
bytes32 tag;
address datasetrestrict;
address workerpoolrestrict;
address requesterrestrict;
bytes32 salt;
bytes sign;
}
struct DatasetOrder {
address dataset;
uint256 datasetprice;
uint256 volume;
bytes32 tag;
address apprestrict;
address workerpoolrestrict;
address requesterrestrict;
bytes32 salt;
bytes sign;
}
struct WorkerpoolOrder {
address workerpool;
uint256 workerpoolprice;
uint256 volume;
bytes32 tag;
uint256 category;
uint256 trust;
address apprestrict;
address datasetrestrict;
address requesterrestrict;
bytes32 salt;
bytes sign;
}
struct RequestOrder {
address app;
uint256 appmaxprice;
address dataset;
uint256 datasetmaxprice;
address workerpool;
uint256 workerpoolmaxprice;
address requester;
uint256 volume;
bytes32 tag;
uint256 category;
uint256 trust;
address beneficiary;
address callback;
string params;
bytes32 salt;
bytes sign;
}
struct AppOrderOperation {
struct IexecLibOrders_v5.AppOrder order;
enum IexecLibOrders_v5.OrderOperationEnum operation;
bytes sign;
}
struct DatasetOrderOperation {
struct IexecLibOrders_v5.DatasetOrder order;
enum IexecLibOrders_v5.OrderOperationEnum operation;
bytes sign;
}
struct WorkerpoolOrderOperation {
struct IexecLibOrders_v5.WorkerpoolOrder order;
enum IexecLibOrders_v5.OrderOperationEnum operation;
bytes sign;
}
struct RequestOrderOperation {
struct IexecLibOrders_v5.RequestOrder order;
enum IexecLibOrders_v5.OrderOperationEnum operation;
bytes sign;
}
function hash(struct IexecLibOrders_v5.EIP712Domain _domain) public pure returns (bytes32 domainhash)
function hash(struct IexecLibOrders_v5.AppOrder _apporder) public pure returns (bytes32 apphash)
function hash(struct IexecLibOrders_v5.DatasetOrder _datasetorder) public pure returns (bytes32 datasethash)
function hash(struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder) public pure returns (bytes32 workerpoolhash)
function hash(struct IexecLibOrders_v5.RequestOrder _requestorder) public pure returns (bytes32 requesthash)
function hash(struct IexecLibOrders_v5.AppOrderOperation _apporderoperation) public pure returns (bytes32)
function hash(struct IexecLibOrders_v5.DatasetOrderOperation _datasetorderoperation) public pure returns (bytes32)
function hash(struct IexecLibOrders_v5.WorkerpoolOrderOperation _workerpoolorderoperation) public pure returns (bytes32)
function hash(struct IexecLibOrders_v5.RequestOrderOperation _requestorderoperation) public pure returns (bytes32)
Every module must inherit from this contract.
function manageAppOrder(struct IexecLibOrders_v5.AppOrderOperation _apporderoperation) external
function manageDatasetOrder(struct IexecLibOrders_v5.DatasetOrderOperation _datasetorderoperation) external
function manageWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrderOperation _workerpoolorderoperation) external
function manageRequestOrder(struct IexecLibOrders_v5.RequestOrderOperation _requestorderoperation) external
event Transfer(address from, address 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)
struct Matching {
bytes32 apporderHash;
address appOwner;
bytes32 datasetorderHash;
address datasetOwner;
bytes32 workerpoolorderHash;
address workerpoolOwner;
bytes32 requestorderHash;
bool hasDataset;
}
function verifySignature(address _identity, bytes32 _hash, bytes _signature) external view returns (bool)
function verifyPresignature(address _identity, bytes32 _hash) external view returns (bool)
function verifyPresignatureOrSignature(address _identity, bytes32 _hash, bytes _signature) external view returns (bool)
function matchOrders(struct IexecLibOrders_v5.AppOrder _apporder, struct IexecLibOrders_v5.DatasetOrder _datasetorder, struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder, struct IexecLibOrders_v5.RequestOrder _requestorder) external returns (bytes32)
Match orders. The requester gets debited.
Name | Type | Description |
---|---|---|
_apporder | struct IexecLibOrders_v5.AppOrder | The app order. |
_datasetorder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. |
_workerpoolorder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. |
_requestorder | struct IexecLibOrders_v5.RequestOrder | The requester order. |
function sponsorMatchOrders(struct IexecLibOrders_v5.AppOrder _apporder, struct IexecLibOrders_v5.DatasetOrder _datasetorder, struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder, struct IexecLibOrders_v5.RequestOrder _requestorder) external returns (bytes32)
Sponsor match orders for a requester.
Unlike the standard matchOrders(..)
hook where the requester pays for
the deal, this current hook makes it possible for any msg.sender
to pay for
a third party requester.
Be aware that anyone seeing a valid request order on the network
(via an off-chain public marketplace, via a sponsorMatchOrders(..)
pending transaction in the mempool or by any other means) might decide
to call the standard matchOrders(..)
hook which will result in the
requester being debited instead. Therefore, such a front run would result
in a loss of some of the requester funds deposited in the iExec account
(a loss value equivalent to the price of the deal).
Name | Type | Description |
---|---|---|
_apporder | struct IexecLibOrders_v5.AppOrder | The app order. |
_datasetorder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. |
_workerpoolorder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. |
_requestorder | struct IexecLibOrders_v5.RequestOrder | The requester order. |
function initialize(bytes32 _dealid, uint256 idx) public returns (bytes32)
function contribute(bytes32 _taskid, bytes32 _resultHash, bytes32 _resultSeal, address _enclaveChallenge, bytes _enclaveSign, bytes _authorizationSign) external
function contributeAndFinalize(bytes32 _taskid, bytes32 _resultDigest, bytes _results, bytes _resultsCallback, address _enclaveChallenge, bytes _enclaveSign, bytes _authorizationSign) external
function reveal(bytes32 _taskid, bytes32 _resultDigest) external
function reopen(bytes32 _taskid) external
function finalize(bytes32 _taskid, bytes _results, bytes _resultsCallback) external
function claim(bytes32 _taskid) public
function initializeArray(bytes32[] _dealid, uint256[] _idx) external returns (bool)
function claimArray(bytes32[] _taskid) external returns (bool)
function initializeAndClaimArray(bytes32[] _dealid, uint256[] _idx) external returns (bool)
function viewDeal(bytes32 id) external view returns (struct IexecLibCore_v5.Deal deal)
Get a deal created by PoCo module.
Name | Type | Description |
---|---|---|
id | bytes32 | The ID of the deal. |
function viewTask(bytes32 id) external view returns (struct IexecLibCore_v5.Task)
Get task created in Classic mode.
Name | Type | Description |
---|---|---|
id | bytes32 | id of the task |
function computeDealVolume(struct IexecLibOrders_v5.AppOrder appOrder, struct IexecLibOrders_v5.DatasetOrder datasetOrder, struct IexecLibOrders_v5.WorkerpoolOrder workerpoolOrder, struct IexecLibOrders_v5.RequestOrder requestOrder) external view returns (uint256)
Computes the volume of the "not yet created" deal based on the provided orders. This function should only be used if the deal is not yet created. For existing deals, use the deal accessors instead.
Name | Type | Description |
---|---|---|
appOrder | struct IexecLibOrders_v5.AppOrder | The application order. |
datasetOrder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. |
workerpoolOrder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. |
requestOrder | struct IexecLibOrders_v5.RequestOrder | The request order. |
Name | Type | Description |
---|---|---|
[0] | uint256 | The computed deal volume. |
Access to PoCo Boost tasks must be done with PoCo Classic IexecAccessors
.
function viewDealBoost(bytes32 id) external view returns (struct IexecLibCore_v5.DealBoost deal)
Get a deal created by PoCo Boost module.
Name | Type | Description |
---|---|---|
id | bytes32 | The ID of the deal. |
Works for deals with requested trust = 0.
function matchOrdersBoost(struct IexecLibOrders_v5.AppOrder appOrder, struct IexecLibOrders_v5.DatasetOrder datasetOrder, struct IexecLibOrders_v5.WorkerpoolOrder workerpoolOrder, struct IexecLibOrders_v5.RequestOrder requestOrder) external returns (bytes32)
This boost match orders is only compatible with trust <= 1. The requester gets debited.
Name | Type | Description |
---|---|---|
appOrder | struct IexecLibOrders_v5.AppOrder | The order signed by the application developer. |
datasetOrder | struct IexecLibOrders_v5.DatasetOrder | The order signed by the dataset provider. |
workerpoolOrder | struct IexecLibOrders_v5.WorkerpoolOrder | The order signed by the workerpool manager. |
requestOrder | struct IexecLibOrders_v5.RequestOrder | The order signed by the requester. |
Name | Type | Description |
---|---|---|
[0] | bytes32 | The ID of the deal. |
function sponsorMatchOrdersBoost(struct IexecLibOrders_v5.AppOrder appOrder, struct IexecLibOrders_v5.DatasetOrder datasetOrder, struct IexecLibOrders_v5.WorkerpoolOrder workerpoolOrder, struct IexecLibOrders_v5.RequestOrder requestOrder) external returns (bytes32)
Sponsor match orders boost for a requester.
Unlike the standard matchOrdersBoost(..)
hook where the requester pays for
the deal, this current hook makes it possible for any msg.sender
to pay for
a third party requester.
Be aware that anyone seeing a valid request order on the network
(via an off-chain public marketplace, via a sponsorMatchOrdersBoost(..)
pending transaction in the mempool or by any other means) might decide
to call the standard matchOrdersBoost(..)
hook which will result in the
requester being debited instead. Therefore, such a front run would result
in a loss of some of the requester funds deposited in the iExec account
(a loss value equivalent to the price of the deal).
Name | Type | Description |
---|---|---|
appOrder | struct IexecLibOrders_v5.AppOrder | The app order. |
datasetOrder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. |
workerpoolOrder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. |
requestOrder | struct IexecLibOrders_v5.RequestOrder | The requester order. |
function pushResultBoost(bytes32 dealId, uint256 index, bytes results, bytes resultsCallback, bytes authorizationSign, address enclaveChallenge, bytes enclaveSign) external
Accept results of a task computed by a worker during Boost workflow.
Name | Type | Description |
---|---|---|
dealId | bytes32 | The id of the target deal. |
index | uint256 | The index of the target task of the deal. |
results | bytes | The results of the task computed by the worker. |
resultsCallback | bytes | The results of the task computed by the worker that will be forwarded as call data to the callback address set by the requester. |
authorizationSign | bytes | The authorization signed by the scheduler. authorizing the worker to push a result. |
enclaveChallenge | address | The enclave address which can produce enclave signature. |
enclaveSign | bytes | The signature generated from the enclave. |
function claimBoost(bytes32 dealId, uint256 index) external
Claim task to get a refund if task is not completed after deadline.
Name | Type | Description |
---|---|---|
dealId | bytes32 | The ID of the deal. |
index | uint256 | The index of the task. |
function setName(address _ens, string _name) external
function name() external view returns (string)
function symbol() external view returns (string)
function decimals() external view returns (uint8)
function totalSupply() external view returns (uint256)
function balanceOf(address account) external view returns (uint256)
function frozenOf(address account) external view returns (uint256)
function allowance(address account, address spender) external view returns (uint256)
function viewAccount(address account) external view returns (struct IexecLibCore_v5.Account)
function token() external view returns (address)
function viewDeal(bytes32 _id) external view returns (struct IexecLibCore_v5.Deal deal)
function viewConsumed(bytes32 _id) external view returns (uint256 consumed)
function viewPresigned(bytes32 _id) external view returns (address signer)
function viewTask(bytes32 _taskid) external view returns (struct IexecLibCore_v5.Task)
function viewContribution(bytes32 _taskid, address _worker) external view returns (struct IexecLibCore_v5.Contribution)
function viewScore(address _worker) external view returns (uint256)
function resultFor(bytes32 id) external view returns (bytes)
function viewCategory(uint256 _catid) external view returns (struct IexecLibCore_v5.Category category)
function countCategory() external view returns (uint256 count)
function appregistry() external view returns (contract IRegistry)
function datasetregistry() external view returns (contract IRegistry)
function workerpoolregistry() external view returns (contract IRegistry)
function teebroker() external view returns (address)
function callbackgas() external view returns (uint256)
function contribution_deadline_ratio() external view returns (uint256)
function reveal_deadline_ratio() external view returns (uint256)
function final_deadline_ratio() external view returns (uint256)
function workerpool_stake_ratio() external view returns (uint256)
function kitty_ratio() external view returns (uint256)
function kitty_min() external view returns (uint256)
function kitty_address() external view returns (address)
function groupmember_purpose() external view returns (uint256)
function eip712domain_separator() external view returns (bytes32)
function createCategory(string name, string description, uint256 workClockTimeRef) external returns (uint256)
Methods
event Transfer(address from, address to, uint256 value)
event Approval(address owner, address spender, uint256 value)
function transfer(address recipient, uint256 amount) external returns (bool)
function approve(address spender, uint256 value) external returns (bool)
function approveAndCall(address spender, uint256 value, bytes extraData) external returns (bool)
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool)
function increaseAllowance(address spender, uint256 addedValue) external returns (bool)
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool)
receive() external payable
fallback() external payable
function deposit() external payable returns (bool)
function depositFor(address target) external payable returns (bool)
function depositForArray(uint256[] amounts, address[] targets) external payable returns (bool)
function withdraw(uint256 amount) external returns (bool)
function withdrawTo(uint256 amount, address target) external returns (bool)
function recover() external returns (uint256)
receive() external payable
fallback() external payable
function deposit(uint256 amount) external returns (bool)
function depositFor(uint256 amount, address target) external returns (bool)
function depositForArray(uint256[] amounts, address[] targets) external returns (bool)
function withdraw(uint256 amount) external returns (bool)
function withdrawTo(uint256 amount, address target) external returns (bool)
function recover() external returns (uint256)
function receiveApproval(address sender, uint256 amount, address token, bytes) external returns (bool)
function configure(address _token, string _name, string _symbol, uint8 _decimal, address _appregistryAddress, address _datasetregistryAddress, address _workerpoolregistryAddress, address _v3_iexecHubAddress) external
function domain() external view returns (struct IexecLibOrders_v5.EIP712Domain)
function updateDomainSeparator() external
function importScore(address _worker) external
function setTeeBroker(address _teebroker) external
function setCallbackGas(uint256 _callbackgas) external
function changeRegistries(address _appregistryAddress, address _datasetregistryAddress, address _workerpoolregistryAddress) external
function broadcastAppOrder(struct IexecLibOrders_v5.AppOrder _apporder) external
function broadcastDatasetOrder(struct IexecLibOrders_v5.DatasetOrder _datasetorder) external
function broadcastWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder) external
function broadcastRequestOrder(struct IexecLibOrders_v5.RequestOrder _requestorder) external