Skip to content

Latest commit

 

History

History
1809 lines (1272 loc) · 38.6 KB

File metadata and controls

1809 lines (1272 loc) · 38.6 KB

Solidity API

IexecInterfaceNative

A global interface that aggregates all the interfaces needed to interact with the PoCo contracts in native mode.

Referenced in the SDK with the current path contracts/IexecInterfaceNative.sol. Changing the name or the path would cause a breaking change in the SDK.

IexecInterfaceToken

A global interface that aggregates all the interfaces needed to interact with the PoCo contracts in token mode.

Referenced in the SDK with the current path contracts/IexecInterfaceToken.sol. Changing the name or the path would cause a breaking change in the SDK.

FacetBase

Every facet must inherit from this contract.

IexecERC20Base

transfer

function transfer(address recipient, uint256 amount) external returns (bool)

approve

function approve(address spender, uint256 value) external returns (bool)

approveAndCall

function approveAndCall(address spender, uint256 value, bytes extraData) external returns (bool)

transferFrom

function transferFrom(address sender, address recipient, uint256 amount) external returns (bool)

increaseAllowance

function increaseAllowance(address spender, uint256 addedValue) external returns (bool)

decreaseAllowance

function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool)

IexecEscrow

Transfer

event Transfer(address from, address to, uint256 value)

Lock

event Lock(address owner, uint256 amount)

Unlock

event Unlock(address owner, uint256 amount)

Reward

event Reward(address owner, uint256 amount, bytes32 ref)

Seize

event Seize(address owner, uint256 amount, bytes32 ref)

IexecCategoryManagerFacet

createCategory

function createCategory(string name, string description, uint256 workClockTimeRef) external returns (uint256)

Methods

IexecConfigurationExtraFacet

changeRegistries

function changeRegistries(address _appregistryAddress, address _datasetregistryAddress, address _workerpoolregistryAddress) external

IexecConfigurationFacet

configure

function configure(address _token, string _name, string _symbol, uint8 _decimal, address _appregistryAddress, address _datasetregistryAddress, address _workerpoolregistryAddress, address _v3_iexecHubAddress) external

domain

function domain() external view returns (struct IexecLibOrders_v5.EIP712Domain)

updateDomainSeparator

function updateDomainSeparator() external

importScore

function importScore(address _worker) external

setTeeBroker

function setTeeBroker(address _teebroker) external

setCallbackGas

function setCallbackGas(uint256 _callbackgas) external

IexecEscrowNativeFacet

receive

receive() external payable

fallback

fallback() external payable

deposit

function deposit() external payable returns (bool)

depositFor

function depositFor(address target) external payable returns (bool)

depositForArray

function depositForArray(uint256[] amounts, address[] targets) external payable returns (bool)

withdraw

function withdraw(uint256 amount) external returns (bool)

withdrawTo

function withdrawTo(uint256 amount, address target) external returns (bool)

recover

function recover() external returns (uint256)

IexecEscrowTokenFacet

receive

receive() external payable

fallback

fallback() external payable

deposit

function deposit(uint256 amount) external returns (bool)

depositFor

function depositFor(uint256 amount, address target) external returns (bool)

depositForArray

function depositForArray(uint256[] amounts, address[] targets) external returns (bool)

withdraw

function withdraw(uint256 amount) external returns (bool)

withdrawTo

function withdrawTo(uint256 amount, address target) external returns (bool)

recover

function recover() external returns (uint256)

receiveApproval

function receiveApproval(address sender, uint256 amount, address token, bytes data) external returns (bool)

Receives approval, deposit and optionally executes a supported operation in one transaction.

Usage patterns:

  1. Simple deposit: RLC.approveAndCall(escrow, amount, "")
  2. Deposit + operation: RLC.approveAndCall(escrow, amount, encodedOperation)

The data parameter should include a function selector (first 4 bytes) to identify the operation, followed by ABI-encoded parameters. Supported operations:

  • matchOrders: Validates sender is requester, then matches orders

_Implementation details:

  • Deposits tokens first, then executes the operation if data is provided
  • Extracts function selector from data to determine the operation
  • Each operation has a validator (_validateMatchOrders, etc.) to check preconditions
  • After validation, _executeOperation performs the delegatecall
  • Error handling is generalized: reverts are bubbled up with revert reasons or custom errors
  • Future operations can be added by implementing a validator and adding a selector case

matchOrders specific notes:

  • Sponsoring is NOT supported. The requester (specified in the request order) always pays for the deal.
  • Clients must compute the exact deal cost and deposit the right amount. The deal cost = (appPrice + datasetPrice + workerpoolPrice) * volume._

Parameters

Name Type Description
sender address The address that approved tokens
amount uint256 Amount of tokens approved and to be deposited
token address Address of the token (must be RLC)
data bytes Optional: Function selector + ABI-encoded parameters

Return Values

Name Type Description
[0] bool success True if operation succeeded @custom:example solidity // Compute deal cost uint256 dealCost = (appPrice + datasetPrice + workerpoolPrice) * volume; // Encode matchOrders operation with selector bytes memory data = abi.encodeWithSelector( IexecPoco1.matchOrders.selector, appOrder, datasetOrder, workerpoolOrder, requestOrder ); // Call the RLC contract with the encoded data. RLC(token).approveAndCall(iexecProxy, dealCost, data);

IexecOrderManagementFacet

manageAppOrder

function manageAppOrder(struct IexecLibOrders_v5.AppOrderOperation _apporderoperation) external

manageDatasetOrder

function manageDatasetOrder(struct IexecLibOrders_v5.DatasetOrderOperation _datasetorderoperation) external

manageWorkerpoolOrder

function manageWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrderOperation _workerpoolorderoperation) external

manageRequestOrder

function manageRequestOrder(struct IexecLibOrders_v5.RequestOrderOperation _requestorderoperation) external

Matching

struct Matching {
  bytes32 apporderHash;
  address appOwner;
  bytes32 datasetorderHash;
  address datasetOwner;
  bytes32 workerpoolorderHash;
  address workerpoolOwner;
  bytes32 requestorderHash;
  bool hasDataset;
}

IexecPoco1Facet

verifySignature

function verifySignature(address _identity, bytes32 _hash, bytes _signature) external view returns (bool)

verifyPresignature

function verifyPresignature(address _identity, bytes32 _hash) external view returns (bool)

verifyPresignatureOrSignature

function verifyPresignatureOrSignature(address _identity, bytes32 _hash, bytes _signature) external view returns (bool)

assertDatasetDealCompatibility

function assertDatasetDealCompatibility(struct IexecLibOrders_v5.DatasetOrder datasetOrder, bytes32 dealId) external view

Public view function to check if a dataset order is compatible with a deal. This function performs all the necessary checks to verify dataset order compatibility with a deal. Reverts with IncompatibleDatasetOrder(reason) if the dataset order is not compatible with the deal, does nothing otherwise.

This function is mainly consumed by offchain clients. It should be carefully inspected if used in on-chain code. This function should not be used in matchOrders since it does not check the same requirements. The choice of reverting instead of returning true/false is motivated by the Java middleware requirements.

Parameters

Name Type Description
datasetOrder struct IexecLibOrders_v5.DatasetOrder The dataset order to verify
dealId bytes32 The deal ID to check against

matchOrders

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.

This function does not use msg.sender to determine who pays for the deal. The sponsor is always set to _requestorder.requester, regardless of who calls this function. This design allows the function to be safely called via delegatecall from other facets (e.g., IexecEscrowTokenFacet.receiveApproval) without security concerns.

Parameters

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.

sponsorMatchOrders

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).

Parameters

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.

IexecPoco2Facet

initialize

function initialize(bytes32 _dealid, uint256 idx) public returns (bytes32)

contribute

function contribute(bytes32 _taskid, bytes32 _resultHash, bytes32 _resultSeal, address _enclaveChallenge, bytes _enclaveSign, bytes _authorizationSign) external

contributeAndFinalize

function contributeAndFinalize(bytes32 _taskid, bytes32 _resultDigest, bytes _results, bytes _resultsCallback, address _enclaveChallenge, bytes _enclaveSign, bytes _authorizationSign) external

reveal

function reveal(bytes32 _taskid, bytes32 _resultDigest) external

reopen

function reopen(bytes32 _taskid) external

finalize

function finalize(bytes32 _taskid, bytes _results, bytes _resultsCallback) external

claim

function claim(bytes32 _taskid) public

initializeArray

function initializeArray(bytes32[] _dealid, uint256[] _idx) external returns (bool)

claimArray

function claimArray(bytes32[] _taskid) external returns (bool)

initializeAndClaimArray

function initializeAndClaimArray(bytes32[] _dealid, uint256[] _idx) external returns (bool)

IexecPocoAccessorsFacet

viewDeal

function viewDeal(bytes32 id) external view returns (struct IexecLibCore_v5.Deal deal)

Get a deal created by PoCo classic facet.

Parameters

Name Type Description
id bytes32 The ID of the deal.

viewTask

function viewTask(bytes32 id) external view returns (struct IexecLibCore_v5.Task)

Get task created in Classic mode.

Parameters

Name Type Description
id bytes32 id of the task

computeDealVolume

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.

Parameters

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.

Return Values

Name Type Description
[0] uint256 The computed deal volume.

viewConsumed

function viewConsumed(bytes32 _id) external view returns (uint256 consumed)

viewPresigned

function viewPresigned(bytes32 _id) external view returns (address signer)

viewContribution

function viewContribution(bytes32 _taskid, address _worker) external view returns (struct IexecLibCore_v5.Contribution)

viewScore

function viewScore(address _worker) external view returns (uint256)

resultFor

function resultFor(bytes32 id) external view returns (bytes)

name

function name() external view returns (string)

symbol

function symbol() external view returns (string)

decimals

function decimals() external view returns (uint8)

totalSupply

function totalSupply() external view returns (uint256)

balanceOf

function balanceOf(address account) external view returns (uint256)

frozenOf

function frozenOf(address account) external view returns (uint256)

allowance

function allowance(address account, address spender) external view returns (uint256)

viewAccount

function viewAccount(address account) external view returns (struct IexecLibCore_v5.Account)

token

function token() external view returns (address)

viewCategory

function viewCategory(uint256 _catid) external view returns (struct IexecLibCore_v5.Category category)

countCategory

function countCategory() external view returns (uint256 count)

appregistry

function appregistry() external view returns (contract IRegistry)

datasetregistry

function datasetregistry() external view returns (contract IRegistry)

workerpoolregistry

function workerpoolregistry() external view returns (contract IRegistry)

teebroker

function teebroker() external view returns (address)

callbackgas

function callbackgas() external view returns (uint256)

viewDataset

function viewDataset(address dataset) external view returns (struct IexecLibCore_v5.DatasetInfo)

viewApp

function viewApp(address app) external view returns (struct IexecLibCore_v5.AppInfo)

viewWorkerpool

function viewWorkerpool(address workerpool) external view returns (struct IexecLibCore_v5.WorkerpoolInfo)

contribution_deadline_ratio

function contribution_deadline_ratio() external pure returns (uint256)

reveal_deadline_ratio

function reveal_deadline_ratio() external pure returns (uint256)

final_deadline_ratio

function final_deadline_ratio() external pure returns (uint256)

workerpool_stake_ratio

function workerpool_stake_ratio() external pure returns (uint256)

kitty_ratio

function kitty_ratio() external pure returns (uint256)

kitty_min

function kitty_min() external pure returns (uint256)

kitty_address

function kitty_address() external pure returns (address)

groupmember_purpose

function groupmember_purpose() external pure returns (uint256)

eip712domain_separator

function eip712domain_separator() external view returns (bytes32)

IexecPocoBoostAccessorsFacet

Access to PoCo Boost tasks must be done with PoCo Classic IexecPocoAccessors.

viewDealBoost

function viewDealBoost(bytes32 id) external view returns (struct IexecLibCore_v5.DealBoost deal)

Get a deal created by PoCo Boost facet.

Parameters

Name Type Description
id bytes32 The ID of the deal.

IexecPocoBoostFacet

Works for deals with requested trust = 0.

matchOrdersBoost

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.

Parameters

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.

Return Values

Name Type Description
[0] bytes32 The ID of the deal.

sponsorMatchOrdersBoost

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).

Parameters

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.

pushResultBoost

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.

Parameters

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.

claimBoost

function claimBoost(bytes32 dealId, uint256 index) external

Claim task to get a refund if task is not completed after deadline.

Parameters

Name Type Description
dealId bytes32 The ID of the deal.
index uint256 The index of the task.

IexecRelayFacet

broadcastAppOrder

function broadcastAppOrder(struct IexecLibOrders_v5.AppOrder _apporder) external

broadcastDatasetOrder

function broadcastDatasetOrder(struct IexecLibOrders_v5.DatasetOrder _datasetorder) external

broadcastWorkerpoolOrder

function broadcastWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder) external

broadcastRequestOrder

function broadcastRequestOrder(struct IexecLibOrders_v5.RequestOrder _requestorder) external

IexecLibCore_v5

Account

Tools

struct Account {
  uint256 stake;
  uint256 locked;
}

Category

struct Category {
  string name;
  string description;
  uint256 workClockTimeRef;
}

DatasetInfo

struct DatasetInfo {
  address owner;
  string m_datasetName;
  bytes m_datasetMultiaddr;
  bytes32 m_datasetChecksum;
}

AppInfo

struct AppInfo {
  address owner;
  string m_appName;
  string m_appType;
  bytes m_appMultiaddr;
  bytes32 m_appChecksum;
  bytes m_appMREnclave;
}

WorkerpoolInfo

struct WorkerpoolInfo {
  address owner;
  string m_workerpoolDescription;
  uint256 m_workerStakeRatioPolicy;
  uint256 m_schedulerRewardRatioPolicy;
}

Resource

Clerk - Deals

struct Resource {
  address pointer;
  address owner;
  uint256 price;
}

Deal

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;
}

DealBoost

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;
}

TaskStatusEnum

Tasks

enum TaskStatusEnum {
  UNSET,
  ACTIVE,
  REVEALING,
  COMPLETED,
  FAILED
}

Task

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

Consensus

struct Consensus {
  mapping(bytes32 => uint256) group;
  uint256 total;
}

ContributionStatusEnum

Consensus

enum ContributionStatusEnum {
  UNSET,
  CONTRIBUTED,
  PROVED,
  REJECTED
}

Contribution

struct Contribution {
  enum IexecLibCore_v5.ContributionStatusEnum status;
  bytes32 resultHash;
  bytes32 resultSeal;
  address enclaveChallenge;
  uint256 weight;
}

IexecLibOrders_v5

EIP712DOMAIN_TYPEHASH

bytes32 EIP712DOMAIN_TYPEHASH

APPORDER_TYPEHASH

bytes32 APPORDER_TYPEHASH

DATASETORDER_TYPEHASH

bytes32 DATASETORDER_TYPEHASH

WORKERPOOLORDER_TYPEHASH

bytes32 WORKERPOOLORDER_TYPEHASH

REQUESTORDER_TYPEHASH

bytes32 REQUESTORDER_TYPEHASH

APPORDEROPERATION_TYPEHASH

bytes32 APPORDEROPERATION_TYPEHASH

DATASETORDEROPERATION_TYPEHASH

bytes32 DATASETORDEROPERATION_TYPEHASH

WORKERPOOLORDEROPERATION_TYPEHASH

bytes32 WORKERPOOLORDEROPERATION_TYPEHASH

REQUESTORDEROPERATION_TYPEHASH

bytes32 REQUESTORDEROPERATION_TYPEHASH

OrderOperationEnum

enum OrderOperationEnum {
  SIGN,
  CLOSE
}

EIP712Domain

struct EIP712Domain {
  string name;
  string version;
  uint256 chainId;
  address verifyingContract;
}

AppOrder

struct AppOrder {
  address app;
  uint256 appprice;
  uint256 volume;
  bytes32 tag;
  address datasetrestrict;
  address workerpoolrestrict;
  address requesterrestrict;
  bytes32 salt;
  bytes sign;
}

DatasetOrder

struct DatasetOrder {
  address dataset;
  uint256 datasetprice;
  uint256 volume;
  bytes32 tag;
  address apprestrict;
  address workerpoolrestrict;
  address requesterrestrict;
  bytes32 salt;
  bytes sign;
}

WorkerpoolOrder

struct WorkerpoolOrder {
  address workerpool;
  uint256 workerpoolprice;
  uint256 volume;
  bytes32 tag;
  uint256 category;
  uint256 trust;
  address apprestrict;
  address datasetrestrict;
  address requesterrestrict;
  bytes32 salt;
  bytes sign;
}

RequestOrder

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;
}

AppOrderOperation

struct AppOrderOperation {
  struct IexecLibOrders_v5.AppOrder order;
  enum IexecLibOrders_v5.OrderOperationEnum operation;
  bytes sign;
}

DatasetOrderOperation

struct DatasetOrderOperation {
  struct IexecLibOrders_v5.DatasetOrder order;
  enum IexecLibOrders_v5.OrderOperationEnum operation;
  bytes sign;
}

WorkerpoolOrderOperation

struct WorkerpoolOrderOperation {
  struct IexecLibOrders_v5.WorkerpoolOrder order;
  enum IexecLibOrders_v5.OrderOperationEnum operation;
  bytes sign;
}

RequestOrderOperation

struct RequestOrderOperation {
  struct IexecLibOrders_v5.RequestOrder order;
  enum IexecLibOrders_v5.OrderOperationEnum operation;
  bytes sign;
}

hash

function hash(struct IexecLibOrders_v5.EIP712Domain _domain) public pure returns (bytes32 domainhash)

hash

function hash(struct IexecLibOrders_v5.AppOrder _apporder) public pure returns (bytes32 apphash)

hash

function hash(struct IexecLibOrders_v5.DatasetOrder _datasetorder) public pure returns (bytes32 datasethash)

hash

function hash(struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder) public pure returns (bytes32 workerpoolhash)

hash

function hash(struct IexecLibOrders_v5.RequestOrder _requestorder) public pure returns (bytes32 requesthash)

hash

function hash(struct IexecLibOrders_v5.AppOrderOperation _apporderoperation) public pure returns (bytes32)

hash

function hash(struct IexecLibOrders_v5.DatasetOrderOperation _datasetorderoperation) public pure returns (bytes32)

hash

function hash(struct IexecLibOrders_v5.WorkerpoolOrderOperation _workerpoolorderoperation) public pure returns (bytes32)

hash

function hash(struct IexecLibOrders_v5.RequestOrderOperation _requestorderoperation) public pure returns (bytes32)

PocoStorageLib

PocoStorage

struct PocoStorage {
  contract IRegistry m_appregistry;
  contract IRegistry m_datasetregistry;
  contract IRegistry m_workerpoolregistry;
  contract IERC20 m_baseToken;
  string m_name;
  string m_symbol;
  uint8 m_decimals;
  uint256 m_totalSupply;
  mapping(address => uint256) m_balances;
  mapping(address => uint256) m_frozens;
  mapping(address => mapping(address => uint256)) m_allowances;
  bytes32 m_eip712DomainSeparator;
  mapping(bytes32 => address) m_presigned;
  mapping(bytes32 => uint256) m_consumed;
  mapping(bytes32 => struct IexecLibCore_v5.Deal) m_deals;
  mapping(bytes32 => struct IexecLibCore_v5.Task) m_tasks;
  mapping(bytes32 => struct IexecLibCore_v5.Consensus) m_consensus;
  mapping(bytes32 => mapping(address => struct IexecLibCore_v5.Contribution)) m_contributions;
  mapping(address => uint256) m_workerScores;
  address m_teebroker;
  uint256 m_callbackgas;
  struct IexecLibCore_v5.Category[] m_categories;
  contract IexecHubV3Interface m_v3_iexecHub;
  mapping(address => bool) m_v3_scoreImported;
  mapping(bytes32 => struct IexecLibCore_v5.DealBoost) m_dealsBoost;
}

IRegistry

isRegistered

function isRegistered(address _entry) external view returns (bool)

Registry

master

address master

proxyCode

bytes proxyCode

proxyCodeHash

bytes32 proxyCodeHash

previous

contract IRegistry previous

initialized

bool initialized

initialize

function initialize(address _previous) external

setBaseURI

function setBaseURI(string baseUri) external

baseURI

function baseURI() public view returns (string)

_Added for retrocompatibility!

Returns the base URI set via {setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's ID._

isRegistered

function isRegistered(address _entry) external view returns (bool)

setName

function setName(address, string) external

Sets the reverse registration name for a registry contract.

This functionality is supported only on Bellecour Sidechain, calls on other chains will revert. The function is kept as nonpayable to maintain retrocompatibility with the iExec SDK.

RegistryEntry

Referenced in the SDK with the current path contracts/registries/RegistryEntry.sol. Changing the name or the path would cause a breaking change in the SDK.

registry

contract IRegistry registry

owner

function owner() public view returns (address)

setName

function setName(address, string) external

Sets the reverse registration name for a registry entry contract.

This functionality is supported only on Bellecour Sidechain, calls on other chains will revert. The function is kept as nonpayable to maintain retrocompatibility with the iExec SDK.

App

Referenced in the SDK with the current path contracts/registries/apps/AppRegistry.sol. Changing the name or the path would cause a breaking change in the SDK.

m_appName

string m_appName

Members

m_appType

string m_appType

m_appMultiaddr

bytes m_appMultiaddr

m_appChecksum

bytes32 m_appChecksum

m_appMREnclave

bytes m_appMREnclave

initialize

function initialize(string _appName, string _appType, bytes _appMultiaddr, bytes32 _appChecksum, bytes _appMREnclave) public

Constructor

AppRegistry

Referenced in the SDK with the current path contracts/registries/apps/AppRegistry.sol. Changing the name or the path would cause a breaking change in the SDK.

constructor

constructor() public

Constructor

createApp

function createApp(address _appOwner, string _appName, string _appType, bytes _appMultiaddr, bytes32 _appChecksum, bytes _appMREnclave) external returns (contract App)

predictApp

function predictApp(address _appOwner, string _appName, string _appType, bytes _appMultiaddr, bytes32 _appChecksum, bytes _appMREnclave) external view returns (contract App)

IApp

owner

function owner() external view returns (address)

m_appName

function m_appName() external view returns (string)

m_appType

function m_appType() external view returns (string)

m_appMultiaddr

function m_appMultiaddr() external view returns (bytes)

m_appChecksum

function m_appChecksum() external view returns (bytes32)

m_appMREnclave

function m_appMREnclave() external view returns (bytes)

Dataset

Referenced in the SDK with the current path contracts/registries/datasets/Dataset.sol. Changing the name or the path would cause a breaking change in the SDK.

m_datasetName

string m_datasetName

Members

m_datasetMultiaddr

bytes m_datasetMultiaddr

m_datasetChecksum

bytes32 m_datasetChecksum

initialize

function initialize(string _datasetName, bytes _datasetMultiaddr, bytes32 _datasetChecksum) public

Constructor

DatasetRegistry

Referenced in the SDK with the current path contracts/registries/datasets/DatasetRegistry.sol. Changing the name or the path would cause a breaking change in the SDK.

constructor

constructor() public

Constructor

createDataset

function createDataset(address _datasetOwner, string _datasetName, bytes _datasetMultiaddr, bytes32 _datasetChecksum) external returns (contract Dataset)

predictDataset

function predictDataset(address _datasetOwner, string _datasetName, bytes _datasetMultiaddr, bytes32 _datasetChecksum) external view returns (contract Dataset)

IDataset

owner

function owner() external view returns (address)

m_datasetName

function m_datasetName() external view returns (string)

m_datasetMultiaddr

function m_datasetMultiaddr() external view returns (bytes)

m_datasetChecksum

function m_datasetChecksum() external view returns (bytes32)

Address

BaseUpgradeabilityProxy

This contract implements a proxy that allows to change the implementation address to which it will delegate. Such a change is called an implementation upgrade.

Upgraded

event Upgraded(address implementation)

Emitted when the implementation is upgraded.

Parameters

Name Type Description
implementation address Address of the new implementation.

InitializableUpgradeabilityProxy

Extends BaseUpgradeabilityProxy with an initializer for initializing implementation and init data.

initialize

function initialize(address _logic, bytes _data) public payable

Contract initializer.

Parameters

Name Type Description
_logic address Address of the initial implementation.
_data bytes Data to send as msg.data to the implementation to initialize the proxied contract. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.

Proxy

_Implements delegation of calls to other contracts, with proper forwarding of return values and bubbling of failures. It defines a fallback function that delegates all calls to the address returned by the abstract implementation() internal function.

receive

receive() external payable virtual

Receive function. Implemented entirely in _fallback.

fallback

fallback() external payable

Fallback function. Implemented entirely in _fallback.

IWorkerpool

owner

function owner() external view returns (address)

m_workerpoolDescription

function m_workerpoolDescription() external view returns (string)

m_schedulerRewardRatioPolicy

function m_schedulerRewardRatioPolicy() external view returns (uint256)

m_workerStakeRatioPolicy

function m_workerStakeRatioPolicy() external view returns (uint256)

Workerpool

Referenced in the SDK with the current path contracts/registries/workerpools/Workerpool.sol. Changing the name or the path would cause a breaking change in the SDK.

m_workerpoolDescription

string m_workerpoolDescription

Parameters

m_workerStakeRatioPolicy

uint256 m_workerStakeRatioPolicy

m_schedulerRewardRatioPolicy

uint256 m_schedulerRewardRatioPolicy

PolicyUpdate

event PolicyUpdate(uint256 oldWorkerStakeRatioPolicy, uint256 newWorkerStakeRatioPolicy, uint256 oldSchedulerRewardRatioPolicy, uint256 newSchedulerRewardRatioPolicy)

Events

initialize

function initialize(string _workerpoolDescription) public

Constructor

changePolicy

function changePolicy(uint256 _newWorkerStakeRatioPolicy, uint256 _newSchedulerRewardRatioPolicy) external

WorkerpoolRegistry

Referenced in the SDK with the current path contracts/registries/workerpools/WorkerpoolRegistry.sol. Changing the name or the path would cause a breaking change in the SDK.

constructor

constructor() public

Constructor

createWorkerpool

function createWorkerpool(address _workerpoolOwner, string _workerpoolDescription) external returns (contract Workerpool)

predictWorkerpool

function predictWorkerpool(address _workerpoolOwner, string _workerpoolDescription) external view returns (contract Workerpool)