API Documentation
API Documentation

Introduction to the Agreements Network

The Agreements Network is the legal layer for a networked world. Be part of the paradigm shift from legal services to legal products. Join the network, build products and services on top of it or reimagine what law looks like when it’s facilitated through technology. The possibilities are truly endless entering into this new paradigm.

After briefly introducing the technical aspects of the Agreements Network this page provides detailed API documentation for the REST API as well as the Contract API.

The Agreements Network Architecture

The Agreements Network’s architecture leverages robust interconnected distributed systems.

Agreements Network Architecture

The Agreements Network is configured to significantly reduce the operational costs to users.By operating a sharded, optimized, zone, the Agreements Network is able to interact with Ethereum smart contracts without being exposed to backlogs or attacks in transactional processing within the Ethereum public blockchain.

The Agreements Network Protocol

The Agreements Network provides structures that support defining and operating legal products.

Agreements Network Protocol

Smart contract factory. A smart contract factory generates other smart contracts. These factories enable reuse of and management of objects within the Agreements Network.

Active Agreements. Active Agreements are the most visible object within the Agreements Network. Active Agreements can be any type of legal artifact or instrument, automated with smart contracts workflows.

Archetypes. Archetypes are smart contracts factories. Each Archetype provides a blueprint for an individual Active Agreement.

Archetype factory. The Agreements Network Archetype Factory enables creative combinations of legal prose templates, standardized parameters, workflows and events to manufacture Archetypes that serve a particular legal services purpose. These archetypes are reusable and manageable as objects within the Agreements Network.

Workflows. A workflow smart contract monitors a specific sequence of events prescribed by an Active Agreement. Separate but related workflows are used during formation and execution of the same Active Agreement. Workflow smart contracts are designed using the Monax Business Process Modeling Engine. Workflow factories. Workflow factories process a sequence of prescribed events, create a specific process contract and register smart contract that within the network. Active Agreements and Agreement factories use workflow factories to execute logic.

Attestations. Attestations are endorsements of fitness of purpose of an Active Agreement made by qualified individual. In return for putting their reputation at stake they are rewarded when a template consumer instantiates an agreement to which they have attested.

Get started as a Network validator

Agreements Network Users

Network Validators assure the operational backbone for the network blockchain by bonding tokens and participating in the decentralized consensus mechanism. In return, Validators earn a Maintenance Fee over the lifecycle of each Active Agreement, based upon their positive contributions to the Agreements Network.

Install Dependencies

The Go programing language is used to build all the necessary tools. Please first install Go, Git, and Make.

Lastly, we need to install jq which is an sed like tool that makes it easy and simple to work with json files as well as curl which is a command line utility to download files, and make which is a command line utility to build files.

Create your own key and send us the information

First you will need Hyperledger Burrow which is the base blockchain node used for the Agreements Network.

# Fetch the source but do not build
go get -d github.com/hyperledger/burrow/cmd/burrow
# Enter source directory in order to do a full build
cd $GOPATH/src/github.com/hyperledger/burrow
# Install Burrow with version metadata into $GOPATH/bin
make install_burrow

burrow keys is a simple tool for generating keys, along with producing and verifying signatures. These features are exposed through the burrow keys tool.

Run burrow keys server on the machine you intend to run as validator and save the process ID in a variable.

burrow keys server &

Next we generate a key with the below command. In the below command we do not give the key a passphrase to encrypt it on disk, but that option is up to you. If you would like to stop the server after your session and/or when you're not running burrow then run pkill burrow.

ADDR=$(burrow keys gen --no-password)

Next also we will pass the new key's address into the export command to give us the output we need.

burrow keys export --addr $ADDR | jq '{Address: .Address, PublicKey: .PublicKey }' > validator_info.json

The final step is to send validator_info.json to the Network Validator Waiting List and keep a note of the validator key you will need to configure your node. When you send the email, we'd love to learn a bit about your organization and why you'd like to join the validator pool.

GET
your_keys_sorted

Boot your burrow node and connect into the network

Once we have confirmed that your key has been moved off the waiting list into the active network then you will boot your local node in the following manner.

(N.B. if you've stoped your keys server then restart it with the commands above. You'll also need to manually add your address into the $ADDR shell variable.)

Now that we have burrow available on our machine we will set it up to connect to the network. First, we'll need to download the genesis.json which sets the beginning of the network along with the burrow.toml that has all the key variables preconfigured. They are both available with a simple curl command.

curl -L https://info.agreements.network/t4/genesis.json > genesis.json
curl -L https://info.agreements.network/t4/burrow.toml > burrow.toml

If you are running burrow directly on a computer (as opposed to within a docker image), then you will need to make one small change to the burrow.toml. Open the burrow.toml file in an editor and change the line which reads:

KeysDirectory = "/keys"

to

KeysDirectory = ".keys"

If you don't know what we mean when we say "open the file in an editor" then simply copy and paste the code below:

Now we are all set to boot our node and connect into the network. From the same directory where you saved your burrow.toml and genesis.json please run the below command. In the below command, you'll change ORGNAME to something which clearly identifies your node on the network.

burrow start \
    --validator-moniker ORGNAME-t4.agreements.network-validator \
    --validator-address $ADDR

Operational Notes

If you are running this on a cloud box you may want to run within tmux or screen so that you can detach from the shell without shutting down the node. At a minimum you'll want to add & or &disown to the end of the command if you are not running within tmux or screen.

Be aware that burrow is a relatively chatty client and over weeks may accumulate a lot of logs. If you're using file based logging make sure that you build a log rotation so that your cloud box does not overfill.

If you're running burrow in a Kubernetes cluster or via Docker then all the commands listed above can be handled with envirnoment variables (i.e., BURROW_VALIDATOR_MONIKER, BURROW_VALIDATOR_ADDRESS and BURROW_VALIDATOR_PASSPHRASE). There is a helm chart for burrow which may be helpful as well.

Structure of the API documentation

The following sections provide in depth guidance and information on the Agreements Network's REST API and Contracts API.

Agreements Network REST API

This is the REST API group for the Agreements Network.

Agreements

Add an agreement to a collection

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/agreement-collections

Example Requests

Error 4xx

Create an Agreement

Success Object

Name Type Description
The String

address of the created Agreement *

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/agreements

Example Requests

Success Response

{
  "address": "6EDC6101F0B64156ED867BAE925F6CD240635656"
}

Success 200

Error 4xx

Create a Agreement Collection

Creates an Active Agreement Collection.

Success Object

Name Type Description
name String

Active Agreement Collection name

author String

Address of the creator (user account or org), logged in user address will be used if none supplied

collectionType Number

Type of collection

packageId String

The packageId of the archetype package from which the collection was created

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreement-collections

Example Requests

Success Response

{
  "id": "9FBC54D1E8224307DA7E74BC54D1E829764E2DE7AD0D8DF6EBC54D1E82ADBCFF"
}

Success 200

Error 4xx

Read an Agreement

Retrieves Active Agreement information for a single Agreement. Notes:

  • If the password provided is incorrect or a hoard reference which does not exist was passed to the posted Active Agreement this get will return a 401.
  • If the agreement was not authored by the logged in user or one of their organizations, or if its signatories does not include the logged in user or one of their organizations, this will return a 404.

Success Object

Name Type Description
address String

Active Agreement's address

name String

Human readable name of the Active Agreement

archetype String

Address of the parent Archetype of the Active Agreement

isPrivate Boolean

Whether the encryption framework of the Active Agreement is operational or not

eventLogHoardAddress String

Hoard address of where event log is stored

eventLogHoardSecret String

Hoard secret of where event log is stored

maxNumberOfEvents Number

Max number of fulfillment events that can be stored in the event log

legalState Number

Legal state of the agreement

formationProcessInstance Number

Address of the agreement's formation process instance

executionProcessInstance Number

Address of the agreement's execution process instance

collectionId String

Id of the collection the agreement belongs to

parties Object[]

An array of objects with each party member's address, user id or organization name, signature timestamp, and address of the user that has signed for the party

parameters Object[]

The " parameter-name " and values of the parameters.

governingAgreements Object[]

An array of the governing agreements with the address , name , and isPrivate value of each

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreements/:address

Example Requests

Success Response

 {
   "address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
   "name": "Agreement",
   "archetype": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
   "isPrivate": false,
   "eventLogHoardAddress": "0000000000000000000000000000000000000000000000000000000000000000",
   "eventLogHoardSecret": "0000000000000000000000000000000000000000000000000000000000000000",
   "maxNumberOfEvents": 0,
   "legalState": 1,
   "formationProcessInstance": "413AC7610E6A4E0ACEB29596FFC52D243A2E7CD7",
   "executionProcessInstance": "0000000000000000000000000000000000000000",
   "collectionId": "9FBC54D1E8224307DA7E74BC54D1E829764E2DE7AD0D8DF6EBC54D1E82ADBCFF",
   "parties": [
     "address": "A072341D3BBD4FDD3CD5D0EBADB0EB37887E3311",
     "organizationName": "Drones Delight"
     "signatureTimestamp": 1529588821427,
     "completedBy": "BE98345FEDCD465D0EBADB0EB3789F234ECBD"
   ],
   "parameters": {
     "parameterName": "parameterValue",
     ...
   },
  "governingAgreements": [
      {
          "address": "B3AEAD4717EFF80BDDF5E22110521029A8460FFB",
          "name": "Governing Agreement",
          "isPrivate": false
      }
  ]
}

Success 200

Error 4xx

Read an Agreement Collection

Retrieves information for a single Agreement Collection if the author is the authenticated user or the organization the user is a member of.

Success Object

Name Type Description
id String

Agreement Collection id

name String

Human readable name of the Agreement Collection

author String

Controller contract of the user or organization

collectionType Number

Type of collection

packageId String

The packageId of the archetype package from which the collection was created

agreements Object[]

Array of agreement objects included in the collection

GET
/agreement-collections/:id

Example Requests

Success Response

{
  "id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD",
  "name": "Agreement Collection 1",
  "author": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "collectionType": 2,
  "packageId": "9FBC54D1E8224307DA7E74BC54D1E829764E2DE7AD0D8DF6EBC54D1E82ADBCFF",
  "agreements": [{
    "name": "Agreement 1",
    "address": "E615D0EC4BB0EDDE615D0EC4BB0EB3D909F66890",
    "archetype": "42B7AC86A84DD3AA054F567BCF5D27D9622FCD0B"
  }]
}

Success 200

Read Agreement Collections

Retrieves Active Agreement Collection information where the author is the authenticated user, or the organization the user is a member of.

Success Objects Array

Name Type Description
id String

Active Agreement Collection id

name String

Human readable name of the Active Agreement Collection

author String

Address of the creator (user account or org)

collectionType Number

Type of collection

packageId String

The packageId of the archetype package from which the collection was created.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreement-collections

Example Requests

Success Response

[{
  "id": "9FBC54D1E8224307DA7E74BC54D1E829764E2DE7AD0D8DF6EBC54D1E82ADBCFF",
  "name": "Agreement Collection 1",
  "author": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "collectionType": 2,
  "packageId": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD"
}]

Success 200

Error 4xx

Read Agreements

Retrieves Active Agreement information of agreements that are public, or if the forCurrentUser query is set to true, a) are authored by the authenticated user, b) are authored by an organization to which the authenticated user belongs, c) include the authenticated user in its signatories, or d) include an organization to which the authenticated user belongs in its signatories

Success Objects Array

Name Type Description
address String

Active Agreement's address

name String

Human readable name of the Active Agreement

archetype String

Address of the parent Archetype of the Active Agreement

isPrivate Boolean

Whether the encryption framework of the Active Agreement is operational or not

numberOfParties Number

The number of parties agreeing to the Active Agreement

hoardAddress String

The hoard content-addressable storage address of the Active Agreement

hoardSecret String

The hashed hoard secret key

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreements

Example Requests

Success Response

[{
  "address": "4AD3C4FA34C8EC5FFBCC4924C2AB16DF72F1EBB8",
  "archetype": "4EF5DAB8CE089AD7F2CE7A04A7CB5DB1C58DB707",
  "name": "Drone Lease",
  "creator": "AB3399395E9CAB5434022D1992D31BB3ACC2E3F1",
  "hoardAddress": "0000000000000000000000000000000000000000000000000000000000000000",
  "hoardSecret": "0000000000000000000000000000000000000000000000000000000000000000",
  "eventLogHoardAddress": "0000000000000000000000000000000000000000000000000000000000000000",
  "eventLogHoardSecret": "0000000000000000000000000000000000000000000000000000000000000000",
  "maxNumberOfEvents": 10,
  "isPrivate": 1,
  "legalState": 1,
  "formationProcessInstance": "038725D6437A809D536B9417047EC74E7FF4D1C0",
  "executionProcessInstance": "0000000000000000000000000000000000000000",
  "numberOfParties": 2
}]

Success 200

Error 4xx

Cancel an Agreement

Cancels an agreement if the authenticated user is a member of the agreement parties, or a member of an organization that is an agreement party

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/agreements

Example Requests

Error 4xx

Sign an Agreement

Signs an agreement by the authenticated user

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/agreements

Example Requests

Error 4xx

Add a Fulfillment Event to an Agreement

Success Object

Name Type Description
address String

The hoard address of the updated event log

secretKey String

The hoard secret key of the updated event log

salt String

The hoard salt of the updated event log

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/agreements/:address/events

Example Requests

Success Response

{
  "address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
  "secretKey": ABCDEF0123456789ABCDEF0123456789,
  "salt": ""
}

Success 200

Error 4xx

Archetypes

Activate an archetype

Activates the archetype so that agreements can be created from it. An archetype can only be activated by its author. This action will fail if the archetype has a successor set.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetypes/:address/activate

Example Requests

Error 4xx

Activate an archetype package

Activates the archetype package An archetype package can only be activated by its author.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetype-packages/:id/activate

Example Requests

Error 4xx

Add an archetype to a package

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetype-packages/:id/archetype/:address

Example Requests

Error 4xx

Create an Archetype

Success-Response:

Name Type Description
The String

address of the created Archetype

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/archetypes

Example Requests

Success Response

{
  "address": "6EDC6101F0B64156ED867BAE925F6CD240635656"
}

Success 200

Error 4xx

Create an Archetype Package

Success-Response:

Name Type Description
The String

id of the created Archetype Package

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/archetypes/packages

Example Requests

Success Response

{
  "id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD"
}

Success 200

Error 4xx

Deactivate an archetype

Deactivates the archetype so that agreements cannot be created from it. An archetype can only be deactivated by its author. Once an archetype is deactivated by its author, it will not be included in GET /archetypes responses made by users other than the author.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetypes/:address/deactivate

Example Requests

Error 4xx

deactivate an archetype package

Deactivates the archetype package An archetype package can only be deactivated by its author. Once an archetype package is deactivated by its author, it will not be included in GET /archetype-packges or GET /archetype-packages/:id responses made by users other than the author.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetype-packages/:id/deactivate

Example Requests

Error 4xx

Read an Archetype

Retrieves archetype information for a single Archetype. This endpoint will return a 404 if: a. the archetype is not found, or b. the archetype is private and the authenticated user is not its author. Note: if the password provided is incorrect or a hoard reference which does not exist was passed to the posted archetype this get will return a 401.

Success Object

Name Type Description
address String

Archetype's address

name String

Human readable name of the Archetype

author String

Controller contract of the user or organization that created the Archetype

description String

Description of the archetype

price Number

Price of the archetype

active Boolean

Whether the Archetype can be used to create new Active Agreements or not

isPrivate Boolean

Whether the encryption framework of the Archetype is operational or not

successor String

Address of the successor archetype

parameters Object[]

The " name " and " type " of all custom parameters used by the Archetype

documents Object[]

The " name " , " hoardAddress " and " secretKey " (if any) sufficient to provide the information regarding the relevant documents associated with the Archetype

jurisdictions Object[]

The " country " and " regions " which the Archetype has been registered as relevant to. The " country " is registered as an ISO standard two character string and " regions " is an array of addresses relating to the controlling contracts for the region (see ISO standards manipulation section).

packages Object[]

The " id " and " name " of each of the packages that the archetype has been added to

GET
/archetypes/:address

Example Requests

Success Response

{
  "address": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "name": "TestType1",
  "author": "6EDC6101F0B64156ED867BAE925F6CD240635656",
  "description": "rental archetype",
  "price": 10,
  "active": false,
  "isPrivate": false,
  "successor": "ED867101F0B64156ED867BAE925F6CD2406350B6",
  "parameters": [{
      "name": "NumberOfTeenageDaughters",
      "type": 2,
      "label": "Number"
    },
    {
      "name": "ExitClause",
      "type": 1,
      "label": "String"
    }
  ],
  "documents": [{
    "name": "Dok1",
    "hoardAddress": "E73C56F6124813EF082D8CDD2C5EC63AFFF95E562F9BE65720C9F69E3B3541A0",
    "secretKey": "87A822883515B65247CBF5A2EE68AF72CB7C2B65B7103CB4340E0C1202FD325E"
  }],
  "jurisdictions": [{
      "country": "US",
      "regions": ["0304CA03C4E9DD0F9676A4463D42BCB686331A5361570D9BF7BC211C1BCA9F1E", "04E01B41ABD856ECAE38A06FB81005A911271B4BF483C10F31C539031C399101"]
    },
    {
      "country": "CA",
      "regions": ["0000000000000000000000000000000000000000000000000000000000000000"]
    }
  ],
  "packages": [{
    "id": "86401D45D372B3E036F91F7DDC87006E069AFCB96B3708B2FBA722D0672DDA7C",
    "name": "Drone Lease Package"
  }],
  "governingArchetypes": [{
    "address": "4EF5DAB8CE089AD7F2CE7A04A7CB5DB1C58DB707",
    "name": "NDA Archetype"
  }]
}

Success 200

Read an Archetype Package

Retrieves information for a single archetype package. Returns a 404 if the package is private or not active and the authenticated user is not its author.

Success Object

Name Type Description
id String

Archetype Package id

name String

Human readable name of the Archetype Package

description String

Human readable description of the Archetype Package

author String

Controller contract of the user or organization

isPrivate Boolean

Indicates whether the package can be read/used publicly

active Boolean

Indicates whether the package has been activated and available for creating collections with.

archetypes Object[]

Array of archetypes with name, address, and active keys that are included in the Archetype Package

GET
/archetype-packages/:id

Example Requests

Success Response

{
  "id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD",
  "name": "Package1",
  "description": "Package Description",
  "author": "6EDC6101F0B64156ED867BAE925F6CD240635656",
  "isPrivate": false,
  "active": true,
  "archetypes": [{
      "name": "Archetype 1",
      "address": "4156ED867BAE4156ED867BAE925F6CD240635656",
      "active": true
    },
    {
      "name": "Archetype 2",
      "address": "406356867BAE4156ED867BAE925F6CD240635656",
      "active": false
    }
  ]
}

Success 200

Read Archetype Packages

Retrieves archetype package information. Within the Agreements Network, Archetype Packages are collections of archetypes that are related in some way. Returns all packages that are either public or authored by the authenticated user

Success Objects Array

Name Type Description
id String

Archetype Package id

name String

Human readable name of the Archetype Pacakge

author String

Controller contract of the user or organization

description String

Description of the package

isPrivate Boolean

Indicates whether the package can be read/used publicly

active Boolean

Indicates whether the package has been activated and available for creating collections with. that created the package

GET
/archetypes

Example Requests

Success Response

[{
  "id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD",
  "name": "Package1",
  "description": "package description"
  "author": "6EDC6101F0B64156ED867BAE925F6CD240635656",
  "isPrivate": false,
  "active": true
}]

Success 200

Read Archetypes

Retrieves archetype information. Within the Agreements Network, Archetypes are the fundamental, top level objects. They are holders for a set of information which allows users to creat Active Agreements within the Platform. The returned list will include archetypes that are: a. authored by the authenticated user, or b. public (ie. isPrivate property is false) and activated (ie. active property is true)

Success Objects Array

Name Type Description
address String

Archetype's address

name String

Human readable name of the Archetype

author String

Controller contract of the user or organization that created the Archetype

description String

description of the Archetype

active Boolean

Whether the Archetype can be used to create new Active Agreements or not

isPrivate Boolean

Whether the encryption framework of the Archetype is operational or not

numberOfParameters Number

The number of custom parameters used by the Archetype

numberOfDocuments Number

The number of documents registered against the Archetype

countries String[]

The jurisdictions in which the Archetype has been registered to be active

GET
/archetypes

Example Requests

Success Response

[{
  "address": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "name": "TestType1",
  "author": "6EDC6101F0B64156ED867BAE925F6CD240635656",
  "description": "This archetype is for testing purposes.",
  "active": false,
  "isPrivate": false,
  "numberOfParameters": 2,
  "numberOfDocuments": 1,
  "countries": ["US", "CA"]
}]

Success 200

Set price of an archetype

Sets the price of given archetype

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetypes/:address/price

Example Requests

Error 4xx

Set successor for an archetype

Sets the successor of given archetype. This action automatically makes the archetype inactive. Note that an archetype cannot point to itself as its successor. It also validates if this action will result in a circular dependency between two archetypes. A succcessor may only be set by the author of the archetype.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetypes/:address/successor/:successor

Example Requests

Error 4xx

BPMModel

Read All Process Definitions

Success Objects Array

Name Type Description
object Object[]

Process Definition object

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-definitions

Example Requests

Success Response

[{
  "address": "81A817870C6C6A209150FA26BC52D835CA6E17D2",
  "modelAddress": "912A82D4C72847EF1EC76426544EAA992993EE20",
  "id": "defaultFormationProcess",
  "name": "Default Formation Process",
  "interfaceId": "Agreement Formation",
  "diagramAddress": "7D85BB76DB402B752F84792FF50B40483922673CF277CD2045D3D9637D4CE8F9",
  "diagramSecret": "4AF3A863BF6F2AD79E4919F562252866CBDA58E3E5AA27E2C5C94BAE9931BE74"
}, {
  "address": "A043C06EB2FB91F4811F51F6500744906FD0903E",
  "modelAddress": "912A82D4C72847EF1EC76426544EAA992993EE20",
  "id": "defaultExecutionProcess",
  "name": "Default Execution Process",
  "interfaceId": "Agreement Execution",
  "diagramAddress": "7D85BB76DB402B752F84792FF50B40483922673CF277CD2045D3D9637D4CE8F9",
  "diagramSecret": "4AF3A863BF6F2AD79E4919F562252866CBDA58E3E5AA27E2C5C94BAE9931BE74"
}]

Success 200

Error 4xx

Read Applications

Success Object Array

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/applications

Example Requests

Success Response

[{
    "id": "AgreementSignatureCheck",
    "applicationType": 2,
    "location": "FFA3BB89E3B0DC63C0CE9BF0E2278B56CE5991F4",
    "webForm": "SigningWebFormWithSignatureCheck",
    "accessPoints": [{
      "accessPointId": "agreement",
      "direction": 0,
      "dataType": 59
    }]
  },
  {
    "id": "WebAppApprovalForm",
    "applicationType": 2,
    "location": "0000000000000000000000000000000000000000",
    "webForm": "TaskApprovalForm",
    "accessPoints": []
  }
]

Error 4xx

Read Single Process Definition

Success Object

Name Type Description
address String

Address of the process definition

modelAddress String

Address of the model the process definition was created under

id String

Id of the process definition

name String

Human-readable name of the process definition

interfaceId String

'Agreement Formation' or 'Agreement Execution'

diagramAddress String

Hoard address for the xml file representing the process

diagramSecret String

Hoard secret for the xml file representing the process

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-definitions/:address

Example Requests

Success Response

{
  "address": "81A817870C6C6A209150FA26BC52D835CA6E17D2",
  "modelAddress": "912A82D4C72847EF1EC76426544EAA992993EE20",
  "id": "defaultFormationProcess",
  "name": "Default Formation Process",
  "interfaceId": "Agreement Formation",
  "diagramAddress": "7D85BB76DB402B752F84792FF50B40483922673CF277CD2045D3D9637D4CE8F9",
  "diagramSecret": "4AF3A863BF6F2AD79E4919F562252866CBDA58E3E5AA27E2C5C94BAE9931BE74"
}

Success 200

Error 4xx

Read Diagram of Process Model

Reads the diagram of the specified process model in the requested MIME type. The 'Accept' header in the request should be set to either 'application/xml' or 'application/json'.

Success Object

Name Type Description
Object Object

with details of the model and processes belonging to it

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-models/:address/diagram

Example Requests

Success Response

{
  "model": {
    "name": "Collaboration_1bqszqk",
    "id": "1534895680958_ommi",
    "version": [
      1,
      0,
      0
    ],
    "private": false,
    "dataStores": [{
        "dataStorage": "PROCESS_INSTANCE",
        "dataPath": "agreement",
        "parameterType": 7
      },
      {
        "dataStorage": "agreement",
        "dataPath": "Assignee",
        "parameterType": 8
      }
    ],
  },
  "processes": [{
    "id": "Process_1rywjij",
    "name": "Process Name",
    "interface": "Agreement Formation",
    "participants": [{
      "id": "Lane_1mjalez",
      "name": "Assignee",
      "tasks": [
        "Task Name"
      ],
      "conditionalPerformer": true,
      "dataStorageId": "agreement",
      "dataPath": "Assignee"
    }],
    "tasks": [],
    "userTasks": [{
      "id": "Task Name",
      "name": "Task Name",
      "assignee": "Lane_1mjalez",
      "activityType": 0,
      "taskType": 1,
      "behavior": 1,
      "multiInstance": false,
      "application": "",
      "subProcessModelId": "",
      "subProcessDefinitionId": ""
    }],
    "sendTasks": [],
    "receiveTasks": [],
    "serviceTasks": [],
    "subProcesses": [],
    "transitions": []
  }]
}

Success 200

Error 4xx

Read Process Models

Success Object Array

Name Type Description
modelAddress String
id String
name String
versionMajor Number
versionMinor Number
versionPatch Number
active Boolean
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-models

Example Requests

Success Response

[{
  "modelAddress": "912A82D4C72847EF1EC76426544EAA992993EE20",
  "id": "0000000000000000000000000000000000000000000000000000000000000000",
  "name": "0000000000000000000000000000000000000000000000000000000000000000",
  "versionMajor": 0,
  "versionMinor": 0,
  "versionPatch": 0,
  "active": true
}]

Success 200

Error 4xx

BPMModel_BPMN_XML_needs_to_be_passed_in_the_request_body_as_plain_text_or_application_xml

Parse BPMN XML and from it create a process model and definition

Success Object

Name Type Description
Model Object

details, process details, and parsed diagram (JSON)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/bpm/process-models

Example Requests

Success Response

{
  "model": {
    "id": "1535053136633_ommi",
    "address": "CDEBECF4D78F2DCF94DFAB12215D018CF1F3F11F"
  },
  "processes": [{
    "address": "43548D6C7894C0E5A7DA1ED08143E1AF4E9DD67E",
    "processDefinitionId": "Process_104nkeu",
    "interfaceId": "Agreement Formation",
    "processName": "Process Name",
    "modelAddress": "CDEBECF4D78F2DCF94DFAB12215D018CF1F3F11F",
    "private": false,
    "author": "AB3399395E9CAB5434022D1992D31BB3ACC2E3F1"
  }],
  "parsedDiagram": {
    "model": {
      "dataStores": [{
          "id": "PROCESS_INSTANCE",
          "name": "Process Instance",
          "parameters": [{
            "name": "agreement",
            "parameterType": 7
          }]
        },
        {
          "id": "agreement",
          "name": "Agreement",
          "parameters": [{
            "name": "Assignee",
            "parameterType": 8
          }]
        }
      ],
      "name": "Collaboration_1bqszqk",
      "id": "1535053136633_ommi",
      "version": [1, 0, 0],
      "private": false,
      "author": "AB3399395E9CAB5434022D1992D31BB3ACC2E3F1"
    },
    "processes": [{
      "id": "Process_104nkeu",
      "name": "Process Name",
      "interface": "Agreement Formation",
      "participants": [{
          "id": "Lane_18i4kvj",
          "name": "Agreement Parties (Signatories)",
          "tasks": ["Task_0ky8n9d"],
          "conditionalPerformer": true,
          "dataStorageId": "agreement",
          "dataPath": "AGREEMENT_PARTIES"
        },
        {
          "id": "Lane_1qvrgtf",
          "name": "Assignee",
          "tasks": ["Task_1jrtitw"],
          "conditionalPerformer": true,
          "dataStorageId": "agreement",
          "dataPath": "Assignee"
        }
      ],
      "tasks": [],
      "userTasks": [{
          "id": "Task_0ky8n9d",
          "name": "Signing Task",
          "assignee": "Lane_18i4kvj",
          "activityType": 0,
          "taskType": 1,
          "behavior": 1,
          "multiInstance": true,
          "dataMappings": [{
            "id": "agreement",
            "direction": 0,
            "dataPath": "agreement",
            "dataStorageId": ""
          }],
          "application": "AgreementSignatureCheck",
          "subProcessModelId": "",
          "subProcessDefinitionId": ""
        },
        {
          "id": "Task_1jrtitw",
          "name": "User Task",
          "assignee": "Lane_1qvrgtf",
          "activityType": 0,
          "taskType": 1,
          "behavior": 1,
          "multiInstance": false,
          "application": "",
          "subProcessModelId": "",
          "subProcessDefinitionId": ""
        }
      ],
      "sendTasks": [],
      "serviceTasks": [],
      "subProcesses": [],
      "transitions": [{
        "id": "SequenceFlow_0twrlls",
        "source": "Task_0ky8n9d",
        "target": "Task_1jrtitw"
      }],
      "activityMap": {
        "Task_0ky8n9d": "Signing Task",
        "Task_1jrtitw": "User Task"
      }
    }]
  }
}

Success 200

Error 4xx

BPMRuntime

Complete task identified by the activityInstanceId

Completes the activity identified by the activityInstanceId. Optionally accepts 'data' array to write.

PUT
/tasks/:activityInstanceId/complete

Example Requests

Read activity instance

Retrieve details of the specified activity instance

Success Object

Name Type Description
object Object

Activity instance object

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/activity-instances/:id

Example Requests

Success Response

{
  "state": 4,
  "processAddress": "A65B3111789E4355EA03E0F109FBDD0042133307",
  "activityInstanceId": "A2A9736AEEC9B1DCAA274DEBF76248EA57ABA0727BDE343C2CDE663FC48E2BF4",
  "activityId": "Sign_Signing Task",
  "created": 1533678582000,
  "performer": "5860AF129980B0E932F3509432A0C43DEAB77B0B",
  "completed": 0,
  "taskType": 1,
  "application": "AgreementSignatureCheck",
  "applicationType": 2,
  "webForm": "DefaultSignAndCompleteForm",
  "processName": "Lease Formation",
  "processDefinitionAddress": "833E7452A7D1B02655889AC52F745FD1D5C50AAC",
  "agreementAddress": "AB3399395E9CAB5434022D1992D31BB3ACC2E3F1",
  "modelAuthor": "5860AF129980B0E932F3509432A0C43DEAB77B0B",
  "private": 0,
  "agreementName": "Drone Lease Agreement",
  "data": {
    "in": [{
        "accessPointId": "readName",
        "dataMappingId": "readName",
        "dataPath": "name"
        "dataStorageId": ""
        "value": "John Doe",
        "dataType": 2 "direction": 0
      },
      {
        "accessPointId": "readApproved",
        "dataMappingId": "readApproved",
        "dataPath": "approved"
        "value": true "dataType": 1 "direction": 0
      },
    ],
    "out": [{
        "accessPointId": "writeName",
        "dataMappingId": "writeName",
        "dataPath": "name"
        "dataStorageId": ""
        "dataType": 2 "direction": 1
      },
      {
        "accessPointId": "writeApproved",
        "dataMappingId": "writeApproved",
        "dataPath": "approved"
        "dataStorageId": ""
        "dataType": 2 "direction": 1
      }
    ]
  }
}

Success 200

Error 4xx

Read single data mapping of an activity instance

Retrieve details of the data mapping with the given ID for the specified activity instance

Success Object

Name Type Description
object Object

Data mapping objects

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/activity-instances/:activityInstanceId/data-mappings/:dataMappingId

Example Requests

Success Response

{
  "accessPointId": "readApproved",
  "dataMappingId": "readApproved",
  "dataPath": "approved",
  "dataStorageId": "",
  "value": true,
  "dataType": 1,
  "direction": 0,
}

Success 200

Error 4xx

Read data mappings of activity instance

Retrieve details of the data mappings for the specified activity instance

Success Object

Name Type Description
object Object[]

Array of data mapping objects

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/activity-instances/:activityInstanceId/data-mappings

Example Requests

Success Response

[{
  "dataMappingId": "readApproved",
  "accessPointId": "readApproved",
  "dataPath": "approved",
  "dataStorageId": "",
  "value": true,
  "dataType": 1,
  "direction": 0,
}]

Success 200

Error 4xx

Read Activities of a process instance

Read all activities of a process instance

Success Objects Array

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/activity-instances

Example Requests

Success Response

[{
  "processAddress": "A65B3111789E4355EA03E0F109FBDD0042133307",
  "activityInstanceId": "A2A9736AEEC9B1DCAA274DEBF76248EA57ABA0727BDE343C2CDE663FC48E2BF4",
  "activityId": "Task_0X7REW5",
  "created": 1533736147000,
  "completed": 0,
  "performer": "5860AF129980B0E932F3509432A0C43DEAB77B0B",
  "completedBy": "0000000000000000000000000000000000000000",
  "state": 4,
  "agreementAddress": "391F69095A291E21079A78F0F67EE167D7628AE2",
  "agreementName": "Agreement Name"
  "processDefinitionAddress": "0506903B34830785168D840BB70D7D48D31A5C1F",
  "processName": "Ship"
}]

Error 4xx

Read Tasks

Retrieves an array of tasks assigned to the logged in user

Success Objects Array

Name Type Description
object Object[]

Array of task objects

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/tasks

Example Requests

Success Response

[{
  "state": 4,
  "processAddress": "A65B3111789E4355EA03E0F109FBDD0042133307",
  "activityInstanceId": "A2A9736AEEC9B1DCAA274DEBF76248EA57ABA0727BDE343C2CDE663FC48E2BF4",
  "activityId": "Task_5ERV12I",
  "created": 1533736147000,
  "performer": "5860AF129980B0E932F3509432A0C43DEAB77B0B",
  "processName": "Process Name",
  "processDefinitionAddress": "833E7452A7D1B02655889AC52F745FD1D5C50AAC",
  "agreementAddress": "AB3399395E9CAB5434022D1992D31BB3ACC2E3F1",
  "agreementName": "Drone Purchase Agreement"
}]

Success 200

Error 4xx

Write single data mapping of an activity instance

Write to the data mapping with the given ID for the specified activity instance

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/activity-instances/:activityInstanceId/data-mappings/:dataMappingId

Example Requests

Error 4xx

Write data mappings of activity instance

Write to data mappings for the specified activity instance

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/activity-instances/:activityInstanceId/data-mappings

Example Requests

Error 4xx

Content

Read Content Object

GET
/hoard

Example Requests

Organizations

Add Users to a Department

Add users to a department

Name Type Description
Success
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/organizations/:address/departments/:departmentId/users

Example Requests

200

Error 4xx

Create a New Department in an Organization

Creating a new department within an organization and add members to it

Success-Response:

Name Type Description
The json

address of the Organization, the id and name of the department, and the users belonging to the department

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/organizations/:address/departments

Example Requests

Success Response

{
  "id": "accounting",
  "name": "Accounting",
  "users": ["9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E"]
}

Success 200

Error 4xx

Create a New Organization

Creating a new organization also established the primary administrators for that organization If no approvers are provided for the organization, then the currently logged-in user will be registered as an approver.

Success-Response:

Name Type Description
The json

address of the created Organization

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/organizations

Example Requests

Success Response

{
"address": "6EDC6101F0B64156ED867BAE925F6CD240635656",
"name": "ACME Corp"
}

Success 200

Error 4xx

Read Organizations

Success Objects Array

Name Type Description
address String

Organization's Controller Contract

id String

Organization's machine readable ID

name String

Organization's human readable name

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/organizations

Example Requests

Success Response

[{
  "address": "DAE988ADED111E6AE82DBFD9AE4FFFE97ADBC23D",
  "approvers": [
    "AB3399395E9CAB5434022D1992D31BB3ACC2E3F1",
    "F5C84B3CC6317023F1E9914BDC86FC0E339E8110",
    "F9EAB43B627645C48F6FDB424F9AD3D760907C25"
  ],
  "name": "orgone"
}]

Success 200

Error 4xx

Read a Single Organization

Success Object

Name Type Description
address String

Organization's Controller Contract

id String

Organization's machine readable ID

name String

Organization's human readable name

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/organizations/:address

Example Requests

Success Response

{
  "address": "DAE988ADED111E6AE82DBFD9AE4FFFE97ADBC23D",
  "name": "orgone",
  "approvers": [{
      "address": "AB3399395E9CAB5434022D1992D31BB3ACC2E3F1",
      "id": "joesmith"
    },
    {
      "address": "F5C84B3CC6317023F1E9914BDC86FC0E339E8110",
      "id": "sarasmith"
    },
    {
      "address": "F9EAB43B627645C48F6FDB424F9AD3D760907C25",
      "id": "ogsmith"
    }
  ],
  "users": [{
      "address": "889A3EEBAC57E0F14D5BAB7AA87A4E69C432ECCD",
      "id": "patmorgan"
      "departments": [
        "acct"
      ],
    },
    {
      "address": "F5C84B3CC6317023F1E9914BDC86FC0E339E8110",
      "id": "sarasmith"
      "departments": [
        "acct"
      ],
    },
    {
      "address": "F9EAB43B627645C48F6FDB424F9AD3D760907C25",
      "id": "ogsmith"
      "departments": [
        "acct"
      ],
    }
  ],
  "departments": [{
    "id": "acct",
    "name": "Accounting",
    "users": [
      "889A3EEBAC57E0F14D5BAB7AA87A4E69C432ECCD",
      "F5C84B3CC6317023F1E9914BDC86FC0E339E8110",
      "F9EAB43B627645C48F6FDB424F9AD3D760907C25"
    ]
  }]
}

Success 200

Error 4xx

Remove a Department

Removing a department within an organization

Name Type Description
Success
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

DELETE
/organizations/:address/departments/:id

Example Requests

200

Error 4xx

Remove User from a Department

Remove a user from a department

Name Type Description
Success
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

DELETE
/organizations/:address/departments/:departmentId/users/:userAddress

Example Requests

200

Error 4xx

Removes a user from Organization

Name Type Description
Success
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

DELETE
/organizations/:orgId/users/:userAddress

Example Requests

200

Error 4xx

Adds user to Organization

Name Type Description
Success
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/organizations/:orgId/users/:userAddress

Example Requests

200

Error 4xx

Runtime

Sign the agreement and complete the activity

Signs the agreement at the given address and then completes the activity identified by the activityInstanceId.

PUT
/tasks/:activityInstanceId/complete/:agreementAddress/sign

Example Requests

StaticData

Read Collection Types

Success Objects Array

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/collection-types

Example Requests

Success Response

[
    {"collectionType": 0, "label": "Case"},
    {"collectionType": 1, "label": "Deal"},
    {"collectionType": 2, "label": "Dossier"},
    {"collectionType": 3, "label": "Folder"},
    {"collectionType": 4, "label": "Matter"},
    {"collectionType": 5, "label": "Package"},
    {"collectionType": 6, "label": "Project"},
]

Error 4xx

Read Countries

Success Objects Array

Name Type Description
countries Object[]

An array of countries objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/countries

Example Requests

Success Response

[{
  "country": "US",
  "alpha2": "US",
  "alpha3": "USA",
  "m49": "840",
  "name": "United States of America"
}]

Success 200

Error 4xx

Read Country

Retrieves the country whose alpha2 code matches the one passed as parameter.

Success Object

Name Type Description
country Object

A single countries objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/countries/:alpha2

Example Requests

Success Response

{
  "country": "US",
  "alpha2": "US",
  "alpha3": "USA",
  "m49": "840",
  "name": "United States of America"
}

Success 200

Error 4xx

Read Currencies

Success Objects Array

Name Type Description
currencies Object[]

An array of currencies objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/currencies

Example Requests

Success Response

[{
    "currency": "AED",
    "alpha3": "AED",
    "m49": "784",
    "name": "United Arab Emirates dirham"
  },
  {
    "currency": "AFN",
    "alpha3": "AFN",
    "m49": "971",
    "name": "Afghan afghani"
  }
]

Success 200

Error 4xx

Read Currency

Retrieves the currency whose alpha3 code matches the one passed as parameter.

Success Objects Array

Name Type Description
currency Object

A single currency objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/currencies/:alpha3

Example Requests

Success Response

{
  "currency": "USD",
  "alpha3": "USD",
  "m49": "840",
  "name": "United States dollar"
}

Success 200

Error 4xx

Read Parameter Types

Success Objects Array

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/parameter-types

Example Requests

Success Response

[
    {"parameterType": 0, "label": "Boolean"},
    {"parameterType": 1, "label": "String"},
    {"parameterType": 2, "label": "Number"},
    {"parameterType": 3, "label": "Date"},
    {"parameterType": 4, "label": "Datetime"},
    {"parameterType": 5, "label": "Monetary Amount"},
    {"parameterType": 6, "label": "User/Organization"},
    {"parameterType": 7, "label": "Contract Address"},
    {"parameterType": 8, "label": "Signing Party"}
]

Error 4xx

Read a Country's Regions

Retrieves an array of regions belonging to the country whose alpha2 code matches the one passed as parameter. Note that a region may have its code2 OR code3 property populated, NOT both. Thus to represent regions in the UI dropdown, we can use <alpha2>-<code2 or code3> followed by the name.

Success Objects Array

Name Type Description
regions Object[]

An array of regions objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/countries/:alpha2/regions

Example Requests

Success Response

[{
    "country": "CA",
    "region": "0798FDAD71114ABA2A3CD6B4BD503410F8EF6B9208B889CC0BB33CD57CEEAA9C",
    "alpha2": "CA",
    "code2": "AB",
    "code3": "",
    "name": "Alberta"
  },
  {
    "country": "CA",
    "region": "1C16E32AED9920491BFED16E1396344027C8D6916833C64CE7F8CCF541398F3B",
    "alpha2": "CA",
    "code2": "NT",
    "code3": "",
    "name": "Northwest Territories"
  }
]

Success 200

Error 4xx

Users

Update User Profile of currently logged in user

Updates a single users profile identified by the access token.

Success Object

Name Type Description
address String

Users's Controller Contract

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/users/profile

Example Requests

Success Response

{
"address": "605401BB8B9E597CC40C35D1F0185DE94DBCE533",
}

Success 200

Error 4xx

Log out a User

POST
/users/logout

Example Requests

Request password reset for a user account

Sends an email with a password recovery code to the given email address

POST
/users/password-recovery

Example Requests

Read User Profile of currently logged in user

Retrieves a single users profile identified by the access token.

Success Object

Name Type Description
address String

Users's Controller Contract

id String

Users's human readable ID

email String

Users's email address

organization String

Organization's Controller Contract

organizationId String

Organization's machine readable ID

organizationName String

Organization's human readable name

firstName String

User's first name

lastName String

User's last name

country String

User's country code

region String

Contract address of user's region

isProducer Boolean

Boolean representing whether user account is producer type (as opposed to consumer type)

onboarding Boolean

Boolean representing whether user prefers to see onboarding screens

createdAt String

Timestamp of user account creation

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/users/profile

Example Requests

Success Response

 {
"address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
"id": "j.smith",
"email": "[email protected]",
"organization": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
"organizationId": "acmecorp92",
"organizationName": "ACME Corp",
"firstName": "Joe",
"lastName": "Smith",
"country": "CA",
"region": "1232SDFF3EC680332BEFDDC3CA12CBBD",
"isProducer": false,
"onboarding": true,
"createdAt": ""
}

Success 200

Error 4xx

Read Users

Retrieves user information. The organization query parameter is optional. It can be used to filter users belonging to a specific organization or retrieving users not belonging to an organization, yet (via ?organization=null).

Note: The organization address is returned as "0000000000000000000000000000000000000000" for user that do not belong to an organization.

Success Objects Array

Name Type Description
address String

Users's Controller Contract

id String

Users's machine readable ID

organization String

Organization's Controller Contract

organizationId String

Organization's machine readable ID

organizationName String

Organization's human readable name

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/users

Example Requests

Success Response

 [
{
"address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
"id": "j.smith",
"organization": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
"organizationId": "acmecorp92",
"organizationName": "ACME Corp"
}
]

Success 200

Error 4xx

Create a New User

Creating a new user

Success Object

Name Type Description
userData Object

The " address " and " id " of the User

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/users

Example Requests

Success Response

{
"address": "605401BB8B9E597CC40C35D1F0185DE94DBCE533",
"id": "johnsmith"
}

Success 200

Error 4xx

Reset password for user account

Resets the user's password with the given password, if the recovery code is valid

PUT
/users/password-recovery/:recoveryCode

Example Requests

Log in as a User

Success Object

Name Type Description
address String

The address of the user

id String

The id (username) of the user

A String

timestamp of the account creation

POST
/users/login

Example Requests

Success Response

{
"address": "41D6BC9143DF87A07F65FCAF642FB89E16D26548",
"id": "jsmith",
"createdAt": "2018-06-25T13:44:26.925Z"
}

Success 200

Validates the given password recovery code

Checks if the given password recovery code is valid

GET
/users/password-recovery/:recoveryCode

Example Requests

Validate user token

This route validates the JWT access_token which should be set as cookie in the request

Success Object

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/users/token/validate

Example Requests

Success Response

 {
"address": "41D6BC9143DF87A07F65FCAF642FB89E16D26548",
"id": "jsmith",
}

Error 4xx

Agreements Network Contracts

The Agreements Network suite of smart contracts are solidity based and provide a near no-code solution for most of the users of the Network.

Below you will find the specifics on how to interact with the smart contracts via solidity based CALLS. These calls can be managed in a variety of ways, from other smart contracts or from various non-blockchain clients.

agreements

AbstractAddressScopes

The AbstractAddressScopes contract is found within the agreements bundle.

getAddressScopeDetails(address,bytes32)

Returns details about the configuration of the address scope.


getAddressScopeDetailsForKey(bytes32)

Returns details about the configuration of the address scope.


getAddressScopeKeys()

Returns the list of keys identifying the address/context scopes.


resolveAddressScope(address,bytes32,address)

Returns the scope qualifier for the given address. If the scope depends on a ConditionalData, the function will attempt to resolve it using the provided DataStorage address. REVERTS if: - the scope is defined by a ConditionalData, but the DataStorage parameter is empty


setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Associates the given address with a scope qualifier for a given context. The context can be used to bind the same address to different scenarios and different scopes. The scope can either be represented by a fixed bytes32 value of by a ConditionalData that resolves to a bytes32 field. REVERTS if: - the given address is empty - neither the scope nor valid ConditionalData parameters are provided


getAddressScopeDetails(address,bytes32)

CALL
getAddressScopeDetails(address,bytes32)

Parameters

_address // an address
_context // a context declaration binding the address to a scope

Return

fixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeDetailsForKey(bytes32)

CALL
getAddressScopeDetailsForKey(bytes32)

Parameters

_key // a scope key

Return

keyAddress - the address encoded in the keykeyContext - the context encoded in the keyfixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeKeys()

CALL
getAddressScopeKeys()

Return

the bytes32 scope keys

resolveAddressScope(address,bytes32,address)

CALL
resolveAddressScope(address,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataStorage // a DataStorage contract to use as a basis if the scope is defined by a ConditionalData

Return

the scope qualifier or an empty bytes32, if no qualifier is set or cannot be determined

setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

CALL
setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataPath // the dataPath of a ConditionalData defining the scope
_dataStorage // the dataStorgage address of a ConditionalData defining the scope
_dataStorageId // the dataStorageId of a ConditionalData defining the scope
_fixedScope // a bytes32 representing a fixed scope

AbstractDataStorage

The AbstractDataStorage contract is found within the agreements bundle.

getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


removeData(bytes32)

Removes the Data identified by the id from the DataMap, if it exists.


getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_id // the key under which to find the array-type value

Return

the number of non-default entries in the array

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

AbstractDbUpgradeable

The AbstractDbUpgradeable contract is found within the agreements bundle.

acceptDatabase(address)

Implementation of DbInterchangeable.acceptDatabase(address). Sets the provided database as this contract's database, if this contract has been granted system ownership of the database. This function can only be called from the upgradeOwner or from another contract that shares the same upgradeOwner (the second scenario applies when the database is migrated from a previous version as part of an upgrade). REVERTS if: - the msg.sender is neither the uprade owner nor another UpgradeOwned contract with the same upgrade owner


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


migrateFrom(address)

Empty implementation of Migratable.migrateFrom(address).


migrateTo(address)

Implementation of Migratable.migrateTo(address) that transfers system ownership of the database in this contract to the successor and calls DbInterchangeable.acceptDatabase(address) on the successor. REVERTS if: - the database contract was not accepted by the successor


minor()

returns the minor version number


patch()

returns the patch version number


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull) REVERTS if: - Either migrateTo or migrateFrom were not successful


acceptDatabase(address)

CALL
acceptDatabase(address)

Parameters

_db // the database contract

Return

true if it was accepted, false otherwise

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Return

always true

migrateTo(address)

CALL
migrateTo(address)

Parameters

_successor // the successor contract to which to migrate the database

Return

true if the database was successfully accepted by the successor, otherwise a REVERT is triggered to rollback the change of system ownership.

minor()

CALL
minor()

patch()

CALL
patch()

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a Versioned contract that replaces this one

Return

true if the upgrade was successful, otherwise a REVERT is triggered to rollback any changes from the upgrade

AbstractERC165

The AbstractERC165 contract is found within the agreements bundle.

supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

AbstractEventListener

The AbstractEventListener contract is found within the agreements bundle.

eventFired(bytes32,address)

See EventListener.eventFired(bytes32,address)


eventFired(bytes32,address,address)

See EventListener.eventFired(bytes32,address,address)


eventFired(bytes32,address,bytes32)

See EventListener.eventFired(bytes32,address,bytes32)


eventFired(bytes32,address,bytes32,address)

See EventListener.eventFired(bytes32,address,bytes32,address)


eventFired(bytes32,address,string)

See EventListener.eventFired(bytes32,address,string)


eventFired(bytes32,address,uint256)

See EventListener.eventFired(bytes32,address,uint)


eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

eventFired(bytes32,address,bytes32,address)

CALL
eventFired(bytes32,address,bytes32,address)

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

AbstractNamedElement

The AbstractNamedElement contract is found within the agreements bundle.

getId()

Returns the ID of this contract.


getName()

Returns the name of this contract.


getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

AbstractUpgradeable

The AbstractUpgradeable contract is found within the agreements bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


migrateFrom(address)

Performs the PULL migration of state from the specified predecessor to this contract.


migrateTo(address)

Performs the PUSH migration of state from this contract to the specified contract.


minor()

returns the minor version number


patch()

returns the patch version number


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull) REVERTS if: - Either migrateTo or migrateFrom were not successful


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

true if the operation succeeded, false otherwise

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

true if the operation succeeded, false otherwise

minor()

CALL
minor()

patch()

CALL
patch()

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a Versioned contract that replaces this one

Return

true if the upgrade was successful, otherwise a REVERT is triggered to rollback any changes from the upgrade

ActiveAgreement Interface

The ActiveAgreement Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


cancel()

Registers the msg.sender as having cancelled the agreement. During formation (legal states DRAFT and FORMULATED), the agreement can cancelled unilaterally by one of the parties to the agreement. During execution (legal state EXECUTED), the agreement can only be canceled if all parties agree to do so by invoking this function. This function should REVERT if the cancel operation could not be carried out successfully.


getAddressScopeDetails(address,bytes32)

Returns details about the configuration of the address scope.


getAddressScopeDetailsForKey(bytes32)

Returns details about the configuration of the address scope.


getAddressScopeKeys()

Returns the list of keys identifying the address/context scopes.


getArchetype()

Returns the archetype


getCreator()

Returns the creator


getDataIdAtIndex(uint256)

Returns the data id at the given index


getDataType(bytes32)

Returns the data type of the Data object identified by the given id


getDataValueAsAddress(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsAddressArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBool(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsIntArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsString(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUintArray(bytes32)

Gets the value of the Data object identified by the given id


getEventLogReference()

Returns the Hoard Address and Hoard Secret for the Event Log


getGoverningAgreementAtIndex(uint256)

Retrieves the address for the governing agreement at the specified index


getGoverningAgreementData(address)

Returns information about the governing agreement with the specified address


getHoardAddress()

Returns the Hoard Address


getHoardSecret()

Returns the Hoard Secret


getLegalState()

Returns the legal state of this agreement


getMaxNumberOfEvents()

Returns the max number of events for the event log


getName()

Returns the name of this contract.


getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getNumberOfGoverningAgreements()

Returns the number governing agreements for this agreement


getNumberOfParties()

Gets number of parties


getPartyAtIndex(uint256)

Returns the party at the given index


getSignatureDetails(address)

Returns the timestamp of the signature of the given party.


getSize()

Returns the size of the DataMap


isPrivate()

Returns the private state


isSignedBy(address)

Returns whether the given account's signature is on the agreement.


removeData(bytes32)

Removes the Data identified by the id from the DataMap, if it exists.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


resolveAddressScope(address,bytes32,address)

Returns the scope for the given address and context. If the scope depends on a ConditionalData, the function should attempt to resolve it and return the result.


setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Associates the given address with a scope qualifier for a given context. The context can be used to bind the same address to different scenarios and different scopes. The scope can either be represented by a fixed bytes32 value of by a ConditionalData that resolves to a bytes32 field.


setDataValueAsAddress(bytes32,address)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsAddressArray(bytes32,address[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBool(bytes32,bool)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32(bytes32,bytes32)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32Array(bytes32,bytes32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt(bytes32,int256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsIntArray(bytes32,int256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsString(bytes32,string)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint(bytes32,uint256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUintArray(bytes32,uint256[100])

Creates a Data object with the given value and inserts it into the DataMap


setEventLogReference(bytes32,bytes32)

Sets the Hoard Address and Hoard Secret for the Event Log


setFulfilled()

Sets the legal state of this agreement to Agreements.LegalState.FULFILLED. Note: All other legal states are set by internal logic.


sign()

Applies the msg.sender signature This function should REVERT if the cancel operation could not be carried out successfully.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

cancel()

CALL
cancel()

getAddressScopeDetails(address,bytes32)

CALL
getAddressScopeDetails(address,bytes32)

Parameters

_address // an address
_context // a context declaration binding the address to a scope

Return

fixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeDetailsForKey(bytes32)

CALL
getAddressScopeDetailsForKey(bytes32)

Parameters

_key // a scope key

Return

keyAddress - the address encoded in the keykeyContext - the context encoded in the keyfixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeKeys()

CALL
getAddressScopeKeys()

Return

the bytes32 scope keys

getArchetype()

CALL
getArchetype()

Return

the archetype address

getCreator()

CALL
getCreator()

Return

the creator

getDataIdAtIndex(uint256)

CALL
getDataIdAtIndex(uint256)

Parameters

_index // the index of the data

Return

error uint error code id bytes32 id of the data

getDataType(bytes32)

CALL
getDataType(bytes32)

Parameters

_id // the id of the data

Return

uint8 the DataType

getDataValueAsAddress(bytes32)

CALL
getDataValueAsAddress(bytes32)

Parameters

_id // the id of the data

Return

address the value of the data

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the id of the data

Return

address[100] the value of the data

getDataValueAsBool(bytes32)

CALL
getDataValueAsBool(bytes32)

Parameters

_id // the id of the data

Return

bool the bool value of the data

getDataValueAsBytes32(bytes32)

CALL
getDataValueAsBytes32(bytes32)

Parameters

_id // the id of the data

Return

bytes32 the value of the data

getDataValueAsBytes32Array(bytes32)

CALL
getDataValueAsBytes32Array(bytes32)

Parameters

_id // the id of the data

Return

bytes32[100] the value of the data

getDataValueAsInt(bytes32)

CALL
getDataValueAsInt(bytes32)

Parameters

_id // the id of the data

Return

int the value of the data

getDataValueAsIntArray(bytes32)

CALL
getDataValueAsIntArray(bytes32)

Parameters

_id // the id of the data

Return

int256[100] the value of the data

getDataValueAsString(bytes32)

CALL
getDataValueAsString(bytes32)

Parameters

_id // the id of the data

Return

string the value of the data

getDataValueAsUint(bytes32)

CALL
getDataValueAsUint(bytes32)

Parameters

_id // the id of the data

Return

uint the value of the data

getDataValueAsUintArray(bytes32)

CALL
getDataValueAsUintArray(bytes32)

Parameters

_id // the id of the data

Return

uint256[100] the value of the data

getEventLogReference()

CALL
getEventLogReference()

Return

the Hoard Address and Hoard Secret for the Event Log

getGoverningAgreementAtIndex(uint256)

CALL
getGoverningAgreementAtIndex(uint256)

Parameters

_index // the index position

Return

the address for the governing agreement

getGoverningAgreementData(address)

CALL
getGoverningAgreementData(address)

Parameters

_agreement // the governing agreement address

Return

the name of the governing agreement

getHoardAddress()

CALL
getHoardAddress()

Return

the Hoard Address

getHoardSecret()

CALL
getHoardSecret()

Return

the Hoard Secret

getLegalState()

CALL
getLegalState()

Return

the Agreements.LegalState as a uint

getMaxNumberOfEvents()

CALL
getMaxNumberOfEvents()

Return

the max number of events for the event log

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_key // the key for the array-type value

Return

the number of non-default entries in the array

getNumberOfGoverningAgreements()

CALL
getNumberOfGoverningAgreements()

Return

the number of governing agreements

getNumberOfParties()

CALL
getNumberOfParties()

Return

size number of parties

getPartyAtIndex(uint256)

CALL
getPartyAtIndex(uint256)

Parameters

_index // the index position

Return

the party's address

getSignatureDetails(address)

CALL
getSignatureDetails(address)

Parameters

_party // the signing party

Return

the address of the signee (if the party authorized a signee other than itself)the time of signing or 0 if the address is not a party to this agreement or has not signed yet

getSize()

CALL
getSize()

Return

uint the size

isPrivate()

CALL
isPrivate()

Return

the private flag 

isSignedBy(address)

CALL
isSignedBy(address)

Parameters

_signee // The account to check

Return

true if the provided address is a recorded signature on the agreement, false otherwise

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

resolveAddressScope(address,bytes32,address)

CALL
resolveAddressScope(address,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataStorage // a DataStorage contract to use as a basis if the scope is defined by a ConditionalData

Return

the scope qualifier or an empty bytes32, if no qualifier is set or cannot be determined

setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

CALL
setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataPath // the dataPath of a ConditionalData defining the scope
_dataStorage // the dataStorgage address of a ConditionalData defining the scope
_dataStorageId // the dataStorageId of a ConditionalData defining the scope
_fixedScope // a bytes32 representing a fixed scope

setDataValueAsAddress(bytes32,address)

CALL
setDataValueAsAddress(bytes32,address)

Parameters

_id // the id of the data
_value // the address value of the data

setDataValueAsAddressArray(bytes32,address[100])

CALL
setDataValueAsAddressArray(bytes32,address[100])

Parameters

_id // the id of the data
_value // the address[100] value of the data

setDataValueAsBool(bytes32,bool)

CALL
setDataValueAsBool(bytes32,bool)

Parameters

_id // the id of the data
_value // the bool value of the data

setDataValueAsBytes32(bytes32,bytes32)

CALL
setDataValueAsBytes32(bytes32,bytes32)

Parameters

_id // the id of the data
_value // the bytes32 value of the data

setDataValueAsBytes32Array(bytes32,bytes32[100])

CALL
setDataValueAsBytes32Array(bytes32,bytes32[100])

Parameters

_id // the id of the data
_value // the bytes32[100] value of the data

setDataValueAsInt(bytes32,int256)

CALL
setDataValueAsInt(bytes32,int256)

Parameters

_id // the id of the data
_value // the int value of the data

setDataValueAsIntArray(bytes32,int256[100])

CALL
setDataValueAsIntArray(bytes32,int256[100])

Parameters

_id // the id of the data
_value // the int256[100] value of the data

setDataValueAsString(bytes32,string)

CALL
setDataValueAsString(bytes32,string)

Parameters

_id // the id of the data
_value // the string value of the data

setDataValueAsUint(bytes32,uint256)

CALL
setDataValueAsUint(bytes32,uint256)

Parameters

_id // the id of the data
_value // the uint value of the data

setDataValueAsUintArray(bytes32,uint256[100])

CALL
setDataValueAsUintArray(bytes32,uint256[100])

Parameters

_id // the id of the data
_value // the uint[100] value of the data

setEventLogReference(bytes32,bytes32)

CALL
setEventLogReference(bytes32,bytes32)

setFulfilled()

CALL
setFulfilled()

sign()

CALL
sign()

ActiveAgreementRegistry Interface

The ActiveAgreementRegistry Interface contract is found within the agreements bundle.

addAgreementToCollection(bytes32,address)

Adds an agreement to given collection


createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32,address[])

Creates an Active Agreement with the given parameters


createAgreementCollection(string,address,uint8,bytes32)

Creates a new agreement collection


createUserAccount(address,bytes32,address,address)

Creates a AgreementPartyAccount with the specified parameters and adds it to the ParticipantsManager


eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,bytes32,address)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


getActiveAgreementAtIndex(uint256)

Gets activeAgreement address at given index


getActiveAgreementData(address)

Returns data about the ActiveAgreement at the specified address


getActiveAgreementsSize()

Gets number of activeAgreements


getAgreementAtIndexInCollection(bytes32,uint256)

Gets agreement address at index in colelction


getAgreementCollectionAtIndex(uint256)

Gets collection id at index


getAgreementCollectionData(bytes32)

Gets collection data by id


getAgreementDataInCollection(bytes32,address)

Get agreement data by collection id and agreement address


getAgreementParameterAtIndex(address,uint256)

Returns the process data ID at the specified index


getAgreementParameterDetails(address,bytes32)

Returns information about the process data entry for the specified process and data ID


getArchetypeRegistry()

Returns the ArchetypeRegistry address


getBpmService()

Returns the BpmService address


getGoverningAgreementAtIndex(address,uint256)

Retrieves the address for the governing agreement at the specified index


getGoverningAgreementData(address,address)

Returns information about the governing agreement with the specified address


getNumberOfAgreementCollections()

Gets number of agreement collections


getNumberOfAgreementParameters(address)

Returns the number of agreement parameter entries.


getNumberOfAgreementsInCollection(bytes32)

Gets number of agreements in given collection


getNumberOfGoverningAgreements(address)

Returns the number governing agreements for given agreement


getPartiesByActiveAgreementSize(address)

Gets parties size for given Active Agreement


getPartyByActiveAgreementAtIndex(address,uint256)

Gets getPartyByActiveAgreementAtIndex


getPartyByActiveAgreementData(address,address)

Returns data about the given party's signature on the specified agreement.


processStateChanged(address)

Invoked by a ProcessStateChangeEventEmitter to notify of process state change


setEventLogReference(address,bytes32,bytes32)

Updates the hoard address and secret for the event log of the specified agreement


startFormation(address)

Creates a starts a ProcessInstance to handle the formation workflow as defined by the given agreement's archetype.


transferAddressScopes(address)

Sets address scopes on the given ProcessInstance based on the scopes defined in the ActiveAgreement referenced in the ProcessInstance. Address scopes relying on a ConditionalData configuration are translated, so they work from the POV of the ProcessInstance. This function ensures that any scopes (roles) set for user/organization addresses on the agreement are adhered to in the process.


upgrade(address)

Performs the necessary steps to upgrade from this contract to the specified new version.


addAgreementToCollection(bytes32,address)

CALL
addAgreementToCollection(bytes32,address)

Parameters

_agreement // agreement address Reverts if collection is not found
_collectionId // the bytes32 collection id

createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32,address[])

CALL
createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32,address[])

Parameters

_archetype // archetype
_collectionId // id of agreement collection (optional)
_creator // address
_eventLogHoardAddress // Address of events log in hoard
_eventLogHoardSecret // Secret for hoard retrieval
_governingAgreements // array of agreement addresses which govern this agreement (optional)
_hoardAddress // Address of agreement params in hoard
_hoardSecret // Secret for hoard retrieval
_isPrivate // agreement is private
_maxNumberOfEvents // Max number of events allowed
_name // name
_parties // parties array

Return

activeAgreement - the new ActiveAgreement's address, if successfully created, 0x0 otherwise Reverts if:	Agreement name or archetype address is empty	Duplicate governing agreements are passed	Agreement address is already registered	Given collectionId does not exist

createAgreementCollection(string,address,uint8,bytes32)

CALL
createAgreementCollection(string,address,uint8,bytes32)

Parameters

_author // address of author
_name // name

Return

an error code indicating success or failureid bytes32 id of package

createUserAccount(address,bytes32,address,address)

CALL
createUserAccount(address,bytes32,address,address)

Parameters

_accountsManager // the ParticipantsManager address
_ecosystem // the address of an Ecosystem to which the user account is connected
_id // an identifier for the user
_owner // the owner of the user account

Return

an error code indicating success or failureuserAccount user account address, or 0x0 if not successful

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32,address)

CALL
eventFired(bytes32,address,bytes32,address)

Parameters

_event // the event name
_key1 // the payload
_key2 // the payload
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

getActiveAgreementAtIndex(uint256)

CALL
getActiveAgreementAtIndex(uint256)

Parameters

_index // index

Return

the Active Agreement address

getActiveAgreementData(address)

CALL
getActiveAgreementData(address)

Parameters

_activeAgreement // Active Agreement

Return

archetype - the agreement's archetype adressname - the name of the agreementcreator - the creator of the agreementhoardAddress - address of the agreement parameters in hoard (only used when agreement is private)hoardSecret - secret for retrieval of hoard parameterseventLogHoardAddress - address of the agreement's event log in hoardeventLogHoardSecret - secret for retrieval of the hoard event log filemaxNumberOfEvents - the maximum number of events allowed to be stored for this agreementisPrivate - whether the agreement's parameters are private, i.e. stored off-chain in hoardlegalState - the agreement's Agreement.LegalState as uint8formationProcessInstance - the address of the process instance representing the formation of this agreementexecutionProcessInstance - the address of the process instance representing the execution of this agreement

getActiveAgreementsSize()

CALL
getActiveAgreementsSize()

Return

size size

getAgreementAtIndexInCollection(bytes32,uint256)

CALL
getAgreementAtIndexInCollection(bytes32,uint256)

Parameters

_id // id of the collection
_index // uint index

Return

agreement address of archetype

getAgreementCollectionAtIndex(uint256)

CALL
getAgreementCollectionAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getAgreementCollectionData(bytes32)

CALL
getAgreementCollectionData(bytes32)

Parameters

_id // bytes32 collection id

Return

name stringauthor addresscollectionType type of collectionpackageId id of the archetype package

getAgreementDataInCollection(bytes32,address)

CALL
getAgreementDataInCollection(bytes32,address)

Parameters

_agreement // address of agreement
_id // id of the collection

Return

agreementName name of agreementarchetype address of archetype

getAgreementParameterAtIndex(address,uint256)

CALL
getAgreementParameterAtIndex(address,uint256)

Parameters

_pos // the index

Return

the data ID

getAgreementParameterDetails(address,bytes32)

CALL
getAgreementParameterDetails(address,bytes32)

Parameters

_address // the active agreement
_dataId // the data ID

Return

(process,id,uintValue,bytes32Value,addressValue,boolValue)

getArchetypeRegistry()

CALL
getArchetypeRegistry()

Return

address the ArchetypeRegistry

getBpmService()

CALL
getBpmService()

Return

address the BpmService

getGoverningAgreementAtIndex(address,uint256)

CALL
getGoverningAgreementAtIndex(address,uint256)

Parameters

_agreement // the address of the agreement
_index // the index position

Return

the address for the governing agreement

getGoverningAgreementData(address,address)

CALL
getGoverningAgreementData(address,address)

Parameters

_agreement // the agreement address
_governingAgreement // the governing agreement address

Return

the name of the governing agreement

getNumberOfAgreementCollections()

CALL
getNumberOfAgreementCollections()

Return

size size

getNumberOfAgreementParameters(address)

CALL
getNumberOfAgreementParameters(address)

Return

the number of parameters

getNumberOfAgreementsInCollection(bytes32)

CALL
getNumberOfAgreementsInCollection(bytes32)

Parameters

_id // id of the collection

Return

size agreement count

getNumberOfGoverningAgreements(address)

CALL
getNumberOfGoverningAgreements(address)

Return

the number of governing agreements

getPartiesByActiveAgreementSize(address)

CALL
getPartiesByActiveAgreementSize(address)

Parameters

_activeAgreement // Active Agreement

Return

size size

getPartyByActiveAgreementAtIndex(address,uint256)

CALL
getPartyByActiveAgreementAtIndex(address,uint256)

Parameters

_activeAgreement // Active Agreement
_index // index

Return

party party

getPartyByActiveAgreementData(address,address)

CALL
getPartyByActiveAgreementData(address,address)

Parameters

_activeAgreement // the ActiveAgreement
_party // the signing party

Return

signedBy the actual signature authorized by the partysignatureTimestamp the timestamp when the party has signed, or 0 if not signed yet

processStateChanged(address)

CALL
processStateChanged(address)

Parameters

_pi // the process instance whose state changed

setEventLogReference(address,bytes32,bytes32)

CALL
setEventLogReference(address,bytes32,bytes32)

Parameters

_activeAgreement // Address of active agreement
_eventLogHoardAddress // New hoard address of event log for agreement
_eventLogHoardSecret // New hoard secret key of event log for agreement

startFormation(address)

CALL
startFormation(address)

Parameters

_agreement // an ActiveAgreement

Return

error - an error code indicating success or failurethe address of the ProcessInstance, if successful

transferAddressScopes(address)

CALL
transferAddressScopes(address)

Parameters

_processInstance // the ProcessInstance being configured

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a contract that replaces this one

Return

true if successful, false otherwise

ActiveAgreementRegistryDb Interface

The ActiveAgreementRegistryDb Interface contract is found within the agreements bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

AddressScopes Interface

The AddressScopes Interface contract is found within the agreements bundle.

getAddressScopeDetails(address,bytes32)

Returns details about the configuration of the address scope.


getAddressScopeDetailsForKey(bytes32)

Returns details about the configuration of the address scope.


getAddressScopeKeys()

Returns the list of keys identifying the address/context scopes.


resolveAddressScope(address,bytes32,address)

Returns the scope for the given address and context. If the scope depends on a ConditionalData, the function should attempt to resolve it and return the result.


setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Associates the given address with a scope qualifier for a given context. The context can be used to bind the same address to different scenarios and different scopes. The scope can either be represented by a fixed bytes32 value of by a ConditionalData that resolves to a bytes32 field.


getAddressScopeDetails(address,bytes32)

CALL
getAddressScopeDetails(address,bytes32)

Parameters

_address // an address
_context // a context declaration binding the address to a scope

Return

fixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeDetailsForKey(bytes32)

CALL
getAddressScopeDetailsForKey(bytes32)

Parameters

_key // a scope key

Return

keyAddress - the address encoded in the keykeyContext - the context encoded in the keyfixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeKeys()

CALL
getAddressScopeKeys()

Return

the bytes32 scope keys

resolveAddressScope(address,bytes32,address)

CALL
resolveAddressScope(address,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataStorage // a DataStorage contract to use as a basis if the scope is defined by a ConditionalData

Return

the scope qualifier or an empty bytes32, if no qualifier is set or cannot be determined

setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

CALL
setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataPath // the dataPath of a ConditionalData defining the scope
_dataStorage // the dataStorgage address of a ConditionalData defining the scope
_dataStorageId // the dataStorageId of a ConditionalData defining the scope
_fixedScope // a bytes32 representing a fixed scope

AgreementPartyAccount

The AgreementPartyAccount contract is found within the agreements bundle.

cancelAgreement(address)

Cancels the provided ActiveAgreement contract in the name of this user


completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


completeActivityWithAddressData(bytes32,address,bytes32,address)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBoolData(bytes32,address,bytes32,bool)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Writes data via BpmService and then completes the specified activity.


completeActivityWithIntData(bytes32,address,bytes32,int256)

Writes data via BpmService and then completes the specified activity.


completeActivityWithStringData(bytes32,address,bytes32,string)

Writes data via BpmService and then completes the specified activity.


completeActivityWithUintData(bytes32,address,bytes32,uint256)

Writes data via BpmService and then completes the specified activity.


getId()

Returns this account's ID


signAgreement(address)

Signs the provided ActiveAgreement contract in the name of this user


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


cancelAgreement(address)

CALL
cancelAgreement(address)

Parameters

_agreement // the address of an ActiveAgreement REVERTS if: - the caller could not be authorized (see AgreementsAPI.authorizePartyActor())

completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

completeActivityWithAddressData(bytes32,address,bytes32,address)

CALL
completeActivityWithAddressData(bytes32,address,bytes32,address)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the address value of the data

Return

error code if the completion failed

completeActivityWithBoolData(bytes32,address,bytes32,bool)

CALL
completeActivityWithBoolData(bytes32,address,bytes32,bool)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bool value of the data

Return

error code if the completion failed

completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

CALL
completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bytes32 value of the data

Return

error code if the completion failed

completeActivityWithIntData(bytes32,address,bytes32,int256)

CALL
completeActivityWithIntData(bytes32,address,bytes32,int256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the int value of the data

Return

error code if the completion failed

completeActivityWithStringData(bytes32,address,bytes32,string)

CALL
completeActivityWithStringData(bytes32,address,bytes32,string)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the string value of the data

Return

error code if the completion failed

completeActivityWithUintData(bytes32,address,bytes32,uint256)

CALL
completeActivityWithUintData(bytes32,address,bytes32,uint256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the uint value of the data

Return

error code if the completion failed

getId()

CALL
getId()

signAgreement(address)

CALL
signAgreement(address)

Parameters

_agreement // the address of an ActiveAgreement REVERTS if: - the caller could not be authorized

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

AgreementPartyProxy

The AgreementPartyProxy contract is found within the agreements bundle.

cancelAgreement(address)

Signs the provided ActiveAgreement contract


completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


completeActivityWithAddressData(bytes32,address,bytes32,address)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBoolData(bytes32,address,bytes32,bool)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Writes data via BpmService and then completes the specified activity.


completeActivityWithIntData(bytes32,address,bytes32,int256)

Writes data via BpmService and then completes the specified activity.


completeActivityWithStringData(bytes32,address,bytes32,string)

Writes data via BpmService and then completes the specified activity.


completeActivityWithUintData(bytes32,address,bytes32,uint256)

Writes data via BpmService and then completes the specified activity.


signAgreement(address)

Signs the provided ActiveAgreement contract


cancelAgreement(address)

CALL
cancelAgreement(address)

Parameters

_agreement // the address of a ActiveAgreement

completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

completeActivityWithAddressData(bytes32,address,bytes32,address)

CALL
completeActivityWithAddressData(bytes32,address,bytes32,address)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the address value of the data

Return

error code if the completion failed

completeActivityWithBoolData(bytes32,address,bytes32,bool)

CALL
completeActivityWithBoolData(bytes32,address,bytes32,bool)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bool value of the data

Return

error code if the completion failed

completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

CALL
completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bytes32 value of the data

Return

error code if the completion failed

completeActivityWithIntData(bytes32,address,bytes32,int256)

CALL
completeActivityWithIntData(bytes32,address,bytes32,int256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the int value of the data

Return

error code if the completion failed

completeActivityWithStringData(bytes32,address,bytes32,string)

CALL
completeActivityWithStringData(bytes32,address,bytes32,string)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the string value of the data

Return

error code if the completion failed

completeActivityWithUintData(bytes32,address,bytes32,uint256)

CALL
completeActivityWithUintData(bytes32,address,bytes32,uint256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the uint value of the data

Return

error code if the completion failed

signAgreement(address)

CALL
signAgreement(address)

Parameters

_agreement // the address of a ActiveAgreement

AgreementSignatureCheck Interface

The AgreementSignatureCheck Interface contract is found within the agreements bundle.

complete(bytes32,bytes32,address)

Treats the provided DataStorage as the agreement and checks if the TX performer has applied a signature. The function will REVERT if the presence of the signature could not be established.


contractChanged(string,address,address)

Implements ContractLocatorEnabled.setContractLocator(address)


setContractLocator(address)

Overrides ContractLocatorEnabled.setContractLocator(address)


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


complete(bytes32,bytes32,address)

CALL
complete(bytes32,bytes32,address)

Parameters

_txPerformer // the address performing the transaction

contractChanged(string,address,address)

CALL
contractChanged(string,address,address)

setContractLocator(address)

CALL
setContractLocator(address)

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

AgreementsAPI

The AgreementsAPI contract is found within the agreements bundle.

authorizePartyActor(ActiveAgreement)

Evaluates the msg.sender and tx.origin against the given agreement to determine if there is an authorized party/actor relationship.


isFullyExecuted(ActiveAgreement)

Checks whether the given agreement is fully executed.


authorizePartyActor(ActiveAgreement)

CALL
authorizePartyActor(ActiveAgreement)

Parameters

_agreement // an ActiveAgreement

Return

actor - the address of either msg.sender or tx.origin depending on which one was authorized; 0x0 if authorization failedparty - the agreement party associated with the identified actor. This is typically the same as the actor, but can also contain an Organization address if an Organization was registered as a party. 0x0 if authorization failed

isFullyExecuted(ActiveAgreement)

CALL
isFullyExecuted(ActiveAgreement)

Parameters

_agreement // an ActiveAgreement

Return

true if all parties have signed, false otherwise

Application

The Application contract is found within the agreements bundle.

complete(bytes32,bytes32,address)

Completion function of this application. This function is invoked by the BPM engine when the application is being executed as part of an activity instance.


complete(bytes32,bytes32,address)

CALL
complete(bytes32,bytes32,address)

ApplicationRegistry Interface

The ApplicationRegistry Interface contract is found within the agreements bundle.

addAccessPoint(bytes32,bytes32,uint8,uint8)

Creates an data access point for the given application


addApplication(bytes32,uint8,address,bytes4,bytes32)

Adds an application with the given parameters to this ProcessModel


getAccessPointAtIndex(bytes32,uint256)

Returns the ID of the access point at the given index


getAccessPointData(bytes32,bytes32)

Returns information about the access point with the given ID


getApplicationAtIndex(uint256)

Returns the ID of the application at the given index


getApplicationData(bytes32)

Returns information about the application with the given ID


getNumberOfAccessPoints(bytes32)

Returns the number of application access points for given application


getNumberOfApplications()

Returns the number of applications defined in this ProcessModel


upgrade(address)

Performs the necessary steps to upgrade from this contract to the specified new version.


addAccessPoint(bytes32,bytes32,uint8,uint8)

CALL
addAccessPoint(bytes32,bytes32,uint8,uint8)

Parameters

_accessPointId // the ID of the new access point
_dataType // a DataTypes code
_direction // the BpmModel.Direction (IN/OUT) of the data flow
_id // the ID of the application to which to add the access point

Return

BaseErrors.RESOURCE_NOT_FOUND() if the application does not exist
BaseBaseErrors.RESOUCE_ALREADY_EXISTS() if the access point already exists
BaseBaseErrors.NO_ERROR() if no errors

addApplication(bytes32,uint8,address,bytes4,bytes32)

CALL
addApplication(bytes32,uint8,address,bytes4,bytes32)

Parameters

_function // the signature of the completion function
_id // the ID of the application
_location // the location of the contract implementing the application
_type // the BpmModel.ApplicationType
_webForm // the hash of a web form (only for web applications)

Return

an error code indicating success or failure

getAccessPointAtIndex(bytes32,uint256)

CALL
getAccessPointAtIndex(bytes32,uint256)

Parameters

_id // the application id
_index // the index position of the access point

Return

the access point id if it exists

getAccessPointData(bytes32,bytes32)

CALL
getAccessPointData(bytes32,bytes32)

Parameters

_accessPointId // the access point ID
_id // the application ID

Return

dataType the data typedirection the direction

getApplicationAtIndex(uint256)

CALL
getApplicationAtIndex(uint256)

Parameters

_idx // the index position

Return

the application ID, if it exists

getApplicationData(bytes32)

CALL
getApplicationData(bytes32)

Parameters

_id // the application ID

Return

applicationType the BpmModel.ApplicationType as uint8location the applications contract addressmethod the function signature of the application's completion functionwebForm the form identifier (hash) of the web application (only for a web application)accessPointCount the count of access points of this application

getNumberOfAccessPoints(bytes32)

CALL
getNumberOfAccessPoints(bytes32)

Parameters

_id // the id of the application

Return

the number of access points for the application

getNumberOfApplications()

CALL
getNumberOfApplications()

Return

the number of applications

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a contract that replaces this one

Return

true if successful, false otherwise

Archetype Interface

The Archetype Interface contract is found within the agreements bundle.

activate()

Activates this archetype


addDocument(bytes32,bytes32,bytes32)

Adds the document specified by the given parameters to the archetype


addJurisdiction(bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations.


addParameter(uint8,bytes32)

Adds a parameter with the specified type and name to the archetype


deactivate()

Deactivates this archetype


getAuthor()

Gets Author


getDescription()

Gets description


getDocument(bytes32)

Gets document with given name


getDocumentAtIndex(uint256)

Gets document name at index


getExecutionProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement execution.


getFormationProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement formation.


getGoverningArchetypeAtIndex(uint256)

Retrieves the address for the governing archetype at the specified index


getGoverningArchetypeData(address)

Returns information about the governing archetype with the specified address


getGoverningArchetypes()

Returns all governing archetype address for this archetype


getJurisdictionAtIndex(uint256)

Retrieves the key for the jurisdiction at the specified index


getJurisdictionData(bytes32)

Returns information about the jurisdiction with the specified key


getName()

Returns the name of this contract.


getNumberOfDocuments()

Gets number of documents


getNumberOfGoverningArchetypes()

Returns the number governing archetypes for this archetype


getNumberOfJurisdictions()

Returns the number jurisdictions for this archetype


getNumberOfParameters()

Gets number of parameters


getParameterAtIndex(uint256)

Gets parameter at index


getParameterDetails(bytes32)

Gets parameter data type


getPrice()

Gets price


getSuccessor()

Returns the successor of this archetype


isActive()

Returns the active state


isPrivate()

Returns the private state


setPrice(uint256)

Sets price


setSuccessor(address)

Sets the successor this archetype. Setting a successor automatically deactivates this archetype. Fails if given successor is the same address as itself. Fails if intended action will lead to two archetypes with their successors pointing to each other.


activate()

CALL
activate()

addDocument(bytes32,bytes32,bytes32)

CALL
addDocument(bytes32,bytes32,bytes32)

Parameters

_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error code indicating success or failure

addJurisdiction(bytes2,bytes32)

CALL
addJurisdiction(bytes2,bytes32)

Parameters

_country // a ISO- code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

error code indicating success or failure
key of the jurisdiction just added

addParameter(uint8,bytes32)

CALL
addParameter(uint8,bytes32)

Parameters

_parameter // parameter
_parameterType // parameter type (enum)

Return

error code indicating success or failure

deactivate()

CALL
deactivate()

getAuthor()

CALL
getAuthor()

Return

author author

getDescription()

CALL
getDescription()

Return

description

getDocument(bytes32)

CALL
getDocument(bytes32)

Parameters

_name // document name

Return

externalContent external content

getDocumentAtIndex(uint256)

CALL
getDocumentAtIndex(uint256)

Parameters

_index // index

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsname

getExecutionProcessDefinition()

CALL
getExecutionProcessDefinition()

Return

the address of a ProcessDefinition

getFormationProcessDefinition()

CALL
getFormationProcessDefinition()

Return

the address of a ProcessDefinition

getGoverningArchetypeAtIndex(uint256)

CALL
getGoverningArchetypeAtIndex(uint256)

Parameters

_index // the index position

Return

the address for the governing archetype

getGoverningArchetypeData(address)

CALL
getGoverningArchetypeData(address)

Parameters

_archetype // the governing archetype address

Return

the name of the governing archetype

getGoverningArchetypes()

CALL
getGoverningArchetypes()

Return

the address array containing all governing archetypes

getJurisdictionAtIndex(uint256)

CALL
getJurisdictionAtIndex(uint256)

Parameters

_index // the index position

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsthe key of the jurisdiction or an empty bytes32 if the index was out of bounds

getJurisdictionData(bytes32)

CALL
getJurisdictionData(bytes32)

Parameters

_key // the key identifying the jurisdiction

Return

the country and region identifiers (see IsoCountries), if the jurisdiction exists

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfDocuments()

CALL
getNumberOfDocuments()

Return

size number of documents

getNumberOfGoverningArchetypes()

CALL
getNumberOfGoverningArchetypes()

Return

the number of governing archetypes

getNumberOfJurisdictions()

CALL
getNumberOfJurisdictions()

Return

the number of jurisdictions

getNumberOfParameters()

CALL
getNumberOfParameters()

Return

size number of parameters

getParameterAtIndex(uint256)

CALL
getParameterAtIndex(uint256)

Parameters

_index // index

Return

error error TBDcustomField parameter

getParameterDetails(bytes32)

CALL
getParameterDetails(bytes32)

Parameters

_parameter // parameter

Return

error error TBDposition index of parameterparameterType parameter type

getPrice()

CALL
getPrice()

Return

price

getSuccessor()

CALL
getSuccessor()

Return

address of successor archetype

isActive()

CALL
isActive()

Return

true if active, false otherwise

isPrivate()

CALL
isPrivate()

Return

true if private, false otherwise

setPrice(uint256)

CALL
setPrice(uint256)

Parameters

_price // price of archetype

setSuccessor(address)

CALL
setSuccessor(address)

Parameters

_successor // address of successor archetype

ArchetypeRegistry Interface

The ArchetypeRegistry Interface contract is found within the agreements bundle.

activate(address,address)

Sets active to true for given archetype


activatePackage(bytes32,address)

Sets active to true for given archetype package


addArchetypeToPackage(bytes32,address)

Adds archetype to package


addDocument(address,bytes32,bytes32,bytes32)

Adds Hoard document to the given Archetype


addJurisdiction(address,bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations.


addJurisdictions(address,bytes2[],bytes32[])

Adds the given jurisdictions in the form of a country codes and region identifiers to this archetype. References codes defined via IsoCountries interface implementations.


addParameter(address,uint8,bytes32)

Adds the specified parameter to the archetype


addParameters(address,uint8[],bytes32[])

Adds the specified parameters to the archetype


createArchetype(bytes32,address,string,uint256,bool,bool,address,address,bytes32,address[])

Creates a new archetype


createArchetypePackage(string,string,address,bool,bool)

Adds a new archetype package


deactivate(address,address)

Sets active to false for given archetype


deactivatePackage(bytes32,address)

Sets active to false for given archetype package


getArchetypeAtIndex(uint256)

Gets archetype address at given index


getArchetypeAtIndexInPackage(bytes32,uint256)

Gets archetype address at index in package


getArchetypeData(address)

Returns data about an archetype


getArchetypeDataInPackage(bytes32,address)

Get archetype data by package id and archetype address


getArchetypePackageAtIndex(uint256)

Gets package id at index


getArchetypePackageData(bytes32)

Gets package data by id


getArchetypeSuccessor(address)

Returns archetype successor


getArchetypesSize()

Gets number of archetypes


getDocumentByArchetypeAtIndex(address,uint256)

Gets document name by Archetype At index


getDocumentByArchetypeData(address,bytes32)

Returns data about the document given the specified name


getDocumentsByArchetypeSize(address)

Gets documents size for given Archetype


getGoverningArchetypeAtIndex(address,uint256)

Retrieves the address of governing archetype at the specified index


getGoverningArchetypeData(address,address)

Returns information about the governing archetype with the specified address


getJurisdictionAtIndexForArchetype(address,uint256)

Returns the jurisdiction key at the specified index for the given archetype


getJurisdictionDataForArchetype(address,bytes32)

Returns data about the jurisdiction with the specified key in the given archetype


getNumberOfArchetypePackages()

Gets number of archetype packages


getNumberOfArchetypesInPackage(bytes32)

Gets number of archetypes in given package


getNumberOfGoverningArchetypes(address)

Returns the number governing archetypes for the given archetype


getNumberOfJurisdictionsForArchetype(address)

Returns the number of jurisdictions for the given Archetype


getParameterByArchetypeAtIndex(address,uint256)

Gets parameter name by Archetype At index


getParameterByArchetypeData(address,bytes32)

Returns data about the parameter at with the specified name


getParametersByArchetypeSize(address)

Gets parameters size for given Archetype


packageHasArchetype(bytes32,address)

Determines whether given archetype address is in the package identified by the packageId


setArchetypePrice(address,uint256)

Sets price of given archetype


setArchetypeSuccessor(address,address,address)

Sets archetype successor


upgrade(address)

Performs the necessary steps to upgrade from this contract to the specified new version.


activate(address,address)

CALL
activate(address,address)

Parameters

_archetype // address of archetype
_author // address of author (must match the author of the archetype in order to activate)

activatePackage(bytes32,address)

CALL
activatePackage(bytes32,address)

Parameters

_author // address of author (must match the author of the archetype package in order to activate)
_id // bytes32 id of archetype package

addArchetypeToPackage(bytes32,address)

CALL
addArchetypeToPackage(bytes32,address)

Parameters

_archetype // the archetype address Reverts if package is not found
_packageId // the bytes32 package id

addDocument(address,bytes32,bytes32,bytes32)

CALL
addDocument(address,bytes32,bytes32,bytes32)

Parameters

_archetype // archetype
_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() _archetype does not exist, or see DefaultArchetype

addJurisdiction(address,bytes2,bytes32)

CALL
addJurisdiction(address,bytes2,bytes32)

Parameters

_country // a ISO- code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

a return code indicating success or failure

addJurisdictions(address,bytes2[],bytes32[])

CALL
addJurisdictions(address,bytes2[],bytes32[])

Parameters

_countries // an array of a ISO- code, e.g. 'US'
_regions // an array of region identifiers from a IsoCountries contract

Return

a return code indicating success or failure

addParameter(address,uint8,bytes32)

CALL
addParameter(address,uint8,bytes32)

Parameters

_parameterName // parameter name
_parameterType // parameter type (enum)

Return

a return code indicating success or failure

addParameters(address,uint8[],bytes32[])

CALL
addParameters(address,uint8[],bytes32[])

Parameters

_parameterNames // parameter names array
_parameterTypes // parameter type (enum) array

Return

a return code indicating success or failure

createArchetype(bytes32,address,string,uint256,bool,bool,address,address,bytes32,address[])

CALL
createArchetype(bytes32,address,string,uint256,bool,bool,address,address,bytes32,address[])

Parameters

_active // determines if this archetype is active
_author // author
_description // description
_executionProcess // the address of a ProcessDefinition that orchestrates the agreement execution
_formationProcess // the address of a ProcessDefinition that orchestrates the agreement formation
_governingArchetypes // array of archetype addresses which govern this archetype (optional)
_isPrivate // determines if the archetype's documents are encrypted
_name // name
_packageId // id of package this archetype is part of (optional)
_price // price

Return

archetype - the new archetype's address, if successfully created Reverts if archetype address is already registered

createArchetypePackage(string,string,address,bool,bool)

CALL
createArchetypePackage(string,string,address,bool,bool)

Parameters

_active // makes it a inactive package
_author // address of author (user account of organization)
_description // description
_isPrivate // makes it a private package visible to only the author
_name // name

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED(), BaseErrors.RESOURCE_ALREADY_EXISTS()id bytes32 id of package

deactivate(address,address)

CALL
deactivate(address,address)

Parameters

_archetype // address of archetype
_author // address of author (must match the author of the archetype in order to deactivate)

deactivatePackage(bytes32,address)

CALL
deactivatePackage(bytes32,address)

Parameters

_author // address of author (must match the author of the archetype package in order to deactivate)
_id // bytes32 id of archetype package

getArchetypeAtIndex(uint256)

CALL
getArchetypeAtIndex(uint256)

Parameters

_index // index

Return

the archetype address

getArchetypeAtIndexInPackage(bytes32,uint256)

CALL
getArchetypeAtIndexInPackage(bytes32,uint256)

Parameters

_id // id of the package
_index // uint index

Return

archetype address of archetype

getArchetypeData(address)

CALL
getArchetypeData(address)

Parameters

_archetype // the archetype address

Return

name namedescription descriptionprice priceauthor author addressactive boolisPrivate boolsuccessor addressformationProcessIdformationProcessDefinitionexecutionProcessIdexecutionProcessDefinition

getArchetypeDataInPackage(bytes32,address)

CALL
getArchetypeDataInPackage(bytes32,address)

Parameters

_archetype // address of archetype
_id // id of the package

Return

archetypeName name of archetype

getArchetypePackageAtIndex(uint256)

CALL
getArchetypePackageAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getArchetypePackageData(bytes32)

CALL
getArchetypePackageData(bytes32)

Parameters

_id // bytes32 package id

Return

name stringdescription stringauthor addressisPrivate boolactive bool

getArchetypeSuccessor(address)

CALL
getArchetypeSuccessor(address)

Parameters

_archetype // address of archetype

Return

address address of successor

getArchetypesSize()

CALL
getArchetypesSize()

Return

size size

getDocumentByArchetypeAtIndex(address,uint256)

CALL
getDocumentByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getDocumentByArchetypeData(address,bytes32)

CALL
getDocumentByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

hoardAddress hoard addresssecretKey secret key

getDocumentsByArchetypeSize(address)

CALL
getDocumentsByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

getGoverningArchetypeAtIndex(address,uint256)

CALL
getGoverningArchetypeAtIndex(address,uint256)

Parameters

_archetype // the address of the archetype
_index // the index position of its governing archetype

Return

the address for the governing archetype

getGoverningArchetypeData(address,address)

CALL
getGoverningArchetypeData(address,address)

Parameters

_archetype // the archetype address
_governingArchetype // the governing archetype address

Return

the name of the governing archetype

getJurisdictionAtIndexForArchetype(address,uint256)

CALL
getJurisdictionAtIndexForArchetype(address,uint256)

Parameters

_archetype // archetype address
_index // the index of the jurisdiction

Return

the jurisdiction primary key

getJurisdictionDataForArchetype(address,bytes32)

CALL
getJurisdictionDataForArchetype(address,bytes32)

Parameters

_archetype // archetype address
_key // the jurisdiction key

Return

country the jurisdiction's countryregion the jurisdiction's region

getNumberOfArchetypePackages()

CALL
getNumberOfArchetypePackages()

Return

size size

getNumberOfArchetypesInPackage(bytes32)

CALL
getNumberOfArchetypesInPackage(bytes32)

Parameters

_id // id of the package

Return

size archetype count

getNumberOfGoverningArchetypes(address)

CALL
getNumberOfGoverningArchetypes(address)

Parameters

_archetype // address of the archetype

Return

the number of governing archetypes

getNumberOfJurisdictionsForArchetype(address)

CALL
getNumberOfJurisdictionsForArchetype(address)

Parameters

_archetype // archetype address

Return

the number of jurisdictions

getParameterByArchetypeAtIndex(address,uint256)

CALL
getParameterByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getParameterByArchetypeData(address,bytes32)

CALL
getParameterByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

position index of parameterparameterType parameter type

getParametersByArchetypeSize(address)

CALL
getParametersByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

packageHasArchetype(bytes32,address)

CALL
packageHasArchetype(bytes32,address)

Parameters

_archetype // address of archetype
_packageId // id of the package

Return

hasArchetype bool representing if archetype is in package

setArchetypePrice(address,uint256)

CALL
setArchetypePrice(address,uint256)

Parameters

_archetype // archetype
_price // price

setArchetypeSuccessor(address,address,address)

CALL
setArchetypeSuccessor(address,address,address)

Parameters

_archetype // address of archetype
_author // address of author (must match the author of the archetype in order to set successor)
_successor // address of successor

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a contract that replaces this one

Return

true if successful, false otherwise

ArchetypeRegistryDb Interface

The ArchetypeRegistryDb Interface contract is found within the agreements bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ArrayUtils Library Interface

The ArrayUtils Library Interface contract is found within the agreements bundle.

contains(address[],address)

Returns whether the specified value is present in the given array


contains(bytes32[],bytes32)

Returns whether the specified value is present in the given array


contains(int256[],int256)

Returns whether the specified value is present in the given array


contains(uint256[],uint256)

Returns whether the specified value is present in the given array


contains(address[],address)

CALL
contains(address[],address)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

contains(bytes32[],bytes32)

CALL
contains(bytes32[],bytes32)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

contains(int256[],int256)

CALL
contains(int256[],int256)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

contains(uint256[],uint256)

CALL
contains(uint256[],uint256)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

BpmService Interface

The BpmService Interface contract is found within the agreements bundle.

createDefaultProcessInstance(address,address,bytes32)

Creates a new ProcessInstance initiated with the provided parameters. This ProcessInstance can be further customized and then submitted to the #startProcessInstance(ProcessInstance) function for execution.


fireActivityUpdateEvent(address,bytes32)

Fires the UpdateActivities event to update sqlsol with given activity


fireProcessDataUpdateEvent(address,bytes32)

Fires the UpdateProcessData event to update sqlsol with given information


getActivityInDataAsAddress(bytes32,bytes32)

Returns the address value of the specified IN data mapping in the context of the given activity instance.


getActivityInDataAsBool(bytes32,bytes32)

Returns the bool value of the specified IN data mapping in the context of the given activity instance.


getActivityInDataAsBytes32(bytes32,bytes32)

Returns the bytes32 value of the specified IN data mapping in the context of the given activity instance.


getActivityInDataAsInt(bytes32,bytes32)

Returns the int value of the specified IN data mapping in the context of the given activity instance.


getActivityInDataAsString(bytes32,bytes32)

Returns the string value of the specified IN data mapping in the context of the given activity instance.


getActivityInDataAsUint(bytes32,bytes32)

Returns the uint value of the specified IN data mapping in the context of the given activity instance.


getActivityInstanceAtIndex(address,uint256)

Returns the ActivityInstance ID at the specified index


getActivityInstanceData(address,bytes32)

Returns ActivityInstance data for the given ActivityInstance ID


getApplicationRegistry()

Returns a reference to the ApplicationRegistry currently used by this BpmService


getBpmServiceDb()

Returns a reference to the BpmServiceDb currently used by this BpmService


getNumberOfActivityInstances(address)

Returns the number of activity instances.


getNumberOfProcessData(address)

Returns the number of process data entries.


getNumberOfProcessInstances()

Returns the number of Process Instances.


getProcessDataAtIndex(address,uint256)

Returns the process data ID at the specified index


getProcessDataDetails(address,bytes32)

Returns information about the process data entry for the specified process and data ID


getProcessInstanceAtIndex(uint256)

Returns the process instance address at the specified index


getProcessInstanceData(address)

Returns information about the process intance with the specified address


getProcessInstanceForActivity(bytes32)

Returns the address of the ProcessInstance of the specified ActivityInstance ID


getProcessModelRepository()

Gets the ProcessModelRepository address for this BpmService


setActivityOutDataAsAddress(bytes32,bytes32,address)

Applies the given value to the OUT data mapping with the specified ID on the specified activity instance.


setActivityOutDataAsBool(bytes32,bytes32,bool)

Applies the given value to the OUT data mapping with the specified ID on the specified activity instance.


setActivityOutDataAsBytes32(bytes32,bytes32,bytes32)

Applies the given bytes32 value to the OUT data mapping with the specified ID on the specified activity instance.


setActivityOutDataAsInt(bytes32,bytes32,int256)

Applies the given int value to the OUT data mapping with the specified ID on the specified activity instance.


setActivityOutDataAsString(bytes32,bytes32,string)

Applies the given value to the OUT data mapping with the specified ID on the specified activity instance.


setActivityOutDataAsUint(bytes32,bytes32,uint256)

Applies the given value to the OUT data mapping with the specified ID on the specified activity instance.


startProcess(address,bytes32)

Creates a new ProcessInstance based on the specified ProcessDefinition and starts its execution


startProcessFromRepository(bytes32,bytes32,bytes32)

Creates a new ProcessInstance based on the specified IDs of a ProcessModel and ProcessDefinition and starts its execution


startProcessInstance(address)

Initializes, registers, and executes a given ProcessInstance


upgrade(address)

Performs the necessary steps to upgrade from this contract to the specified new version.


createDefaultProcessInstance(address,address,bytes32)

CALL
createDefaultProcessInstance(address,address,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_processDefinition // the address of a ProcessDefinition
_startedBy // the address of an account that regarded as the starting user

fireActivityUpdateEvent(address,bytes32)

CALL
fireActivityUpdateEvent(address,bytes32)

Parameters

_activityId // - the bytes32 Id of the activity
_piAddress // - the address of the process instance to which the activity belongs

fireProcessDataUpdateEvent(address,bytes32)

CALL
fireProcessDataUpdateEvent(address,bytes32)

Parameters

_dataId // - the ID of the data entry
_piAddress // - the address of the process instance to which the activity belongs

getActivityInDataAsAddress(bytes32,bytes32)

CALL
getActivityInDataAsAddress(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an IN data mapping defined for the activity

Return

the address value resulting from resolving the data mapping

getActivityInDataAsBool(bytes32,bytes32)

CALL
getActivityInDataAsBool(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an IN data mapping defined for the activity

Return

the bool value resulting from resolving the data mapping

getActivityInDataAsBytes32(bytes32,bytes32)

CALL
getActivityInDataAsBytes32(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an IN data mapping defined for the activity

Return

the bytes32 value resulting from resolving the data mapping

getActivityInDataAsInt(bytes32,bytes32)

CALL
getActivityInDataAsInt(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an IN data mapping defined for the activity

Return

the int value resulting from resolving the data mapping

getActivityInDataAsString(bytes32,bytes32)

CALL
getActivityInDataAsString(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an IN data mapping defined for the activity

Return

the string value resulting from resolving the data mapping

getActivityInDataAsUint(bytes32,bytes32)

CALL
getActivityInDataAsUint(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an IN data mapping defined for the activity

Return

the uint value resulting from resolving the data mapping

getActivityInstanceAtIndex(address,uint256)

CALL
getActivityInstanceAtIndex(address,uint256)

Parameters

_address // the process instance address
_pos // the activity instance index

Return

the ActivityInstance ID

getActivityInstanceData(address,bytes32)

CALL
getActivityInstanceData(address,bytes32)

Parameters

_id // the global ID of the activity instance
_processInstance // the process instance address to which the ActivityInstance belongs

Return

activityId - the ID of the activity as defined by the process definitioncreated - the creation timestampcompleted - the completion timestampperformer - the account who is performing the activity (for interactive activities only)completedBy - the account who completed the activity (for interactive activities only) state - the uint8 representation of the BpmRuntime.ActivityInstanceState of this activity instance

getApplicationRegistry()

CALL
getApplicationRegistry()

Return

the ApplicationRegistry

getBpmServiceDb()

CALL
getBpmServiceDb()

Return

the BpmServiceDb

getNumberOfActivityInstances(address)

CALL
getNumberOfActivityInstances(address)

Return

the activity instance count as size

getNumberOfProcessData(address)

CALL
getNumberOfProcessData(address)

Return

the process data size

getNumberOfProcessInstances()

CALL
getNumberOfProcessInstances()

Return

the process instance count as size

getProcessDataAtIndex(address,uint256)

CALL
getProcessDataAtIndex(address,uint256)

Parameters

_pos // the index

Return

the data ID

getProcessDataDetails(address,bytes32)

CALL
getProcessDataDetails(address,bytes32)

Parameters

_address // the process instance
_dataId // the data ID

Return

(process,id,uintValue,bytes32Value,addressValue,boolValue)

getProcessInstanceAtIndex(uint256)

CALL
getProcessInstanceAtIndex(uint256)

Parameters

_pos // the index

Return

the process instance address or or BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0

getProcessInstanceData(address)

CALL
getProcessInstanceData(address)

Parameters

_address // the process instance address

Return

processDefinition the address of the ProcessDefinitionstate the BpmRuntime.ProcessInstanceState as uint8startedBy the address of the account who started the process

getProcessInstanceForActivity(bytes32)

CALL
getProcessInstanceForActivity(bytes32)

Parameters

_aiId // the ID of an ActivityInstance

Return

the ProcessInstance address or 0x0 if it cannot be found

getProcessModelRepository()

CALL
getProcessModelRepository()

Return

the address of the repository

setActivityOutDataAsAddress(bytes32,bytes32,address)

CALL
setActivityOutDataAsAddress(bytes32,bytes32,address)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an OUT data mapping defined for the activity
_value // the value to set

setActivityOutDataAsBool(bytes32,bytes32,bool)

CALL
setActivityOutDataAsBool(bytes32,bytes32,bool)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an OUT data mapping defined for the activity
_value // the value to set

setActivityOutDataAsBytes32(bytes32,bytes32,bytes32)

CALL
setActivityOutDataAsBytes32(bytes32,bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an OUT data mapping defined for the activity
_value // the value to set

setActivityOutDataAsInt(bytes32,bytes32,int256)

CALL
setActivityOutDataAsInt(bytes32,bytes32,int256)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an OUT data mapping defined for the activity
_value // the value to set

setActivityOutDataAsString(bytes32,bytes32,string)

CALL
setActivityOutDataAsString(bytes32,bytes32,string)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an OUT data mapping defined for the activity
_value // the value to set

setActivityOutDataAsUint(bytes32,bytes32,uint256)

CALL
setActivityOutDataAsUint(bytes32,bytes32,uint256)

Parameters

_activityInstanceId // the ID of an activity instance managed by this BpmService
_dataMappingId // the ID of an OUT data mapping defined for the activity
_value // the value to set

startProcess(address,bytes32)

CALL
startProcess(address,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_processDefinition // the address of a ProcessDefinition

Return

error code indicating success or failureinstance the address of a ProcessInstance, if successful

startProcessFromRepository(bytes32,bytes32,bytes32)

CALL
startProcessFromRepository(bytes32,bytes32,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_modelId // the model that qualifies the process ID, if multiple models are deployed, otherwise optional
_processDefinitionId // the ID of the process definition

Return

error code indicating success or failureinstance the address of a ProcessInstance, if successful

startProcessInstance(address)

CALL
startProcessInstance(address)

Parameters

_pi // the ProcessInstance

Return

BaseErrors.NO_ERROR() if successful or an error code from initializing or executing the ProcessInstance

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a contract that replaces this one

Return

true if successful, false otherwise

BpmServiceDb

The BpmServiceDb contract is found within the agreements bundle.

addActivityInstance(bytes32)

Adds the given ActivityInstance ID to the registered activity instances. Can only be invoked by an already registered ProcessInstance. The sending ProcessInstance (msg.sender) is recorded as well.


addProcessInstance(address)

Adds the given address to the registered process instances. Can only be invoked by the owner of this BpmServiceDb.


getNumberOfActivityInstances()

Returns the number of registered activity instances.


getNumberOfProcessInstances()

Returns the number of registered process instances.


getProcessInstanceAtIndex(uint256)

Returns the process instance address at the specified index


getProcessInstanceForActivity(bytes32)

Returns the address of the ProcessInstance of the specified ActivityInstance ID


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


addActivityInstance(bytes32)

CALL
addActivityInstance(bytes32)

Parameters

_id // the globally unique ID of an ActivityInstance

addProcessInstance(address)

CALL
addProcessInstance(address)

Parameters

_address // the address of a ProcessInstance

getNumberOfActivityInstances()

CALL
getNumberOfActivityInstances()

Return

the number of activity instances

getNumberOfProcessInstances()

CALL
getNumberOfProcessInstances()

Return

the number of process instances

getProcessInstanceAtIndex(uint256)

CALL
getProcessInstanceAtIndex(uint256)

Parameters

_pos // the index

Return

the process instance address

getProcessInstanceForActivity(bytes32)

CALL
getProcessInstanceForActivity(bytes32)

Parameters

_aiId // the ID of an ActivityInstance

Return

the ProcessInstance address or 0x0 if it cannot be found

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Identifiable Interface

The Identifiable Interface contract is found within the agreements bundle.

getId()

Returns the identifier of this contract.


getId()

CALL
getId()

Return

the bytes32 ID

ContractChangeListener

The ContractChangeListener contract is found within the agreements bundle.

contractChanged(string,address,address)

Signals to the implementing contract that the registered contract with the specified name has changed from the old address to the new


contractChanged(string,address,address)

CALL
contractChanged(string,address,address)

Parameters

_name // the name under which the contract is known
_newAddress // the new address registered under that name
_oldAddress // the former address registered under that name

ContractLocator Interface

The ContractLocator Interface contract is found within the agreements bundle.

addContractChangeListener(string)

Adds the msg.sender as a listener for change events for the contract registered with the given name


getContract(string)

returns the address of the contract registered under the specified name. TODO can be extended in the future to include version!


removeContractChangeListener(string)

Removes the msg.sender from the list of listeners for the contract with the given name


addContractChangeListener(string)

CALL
addContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

getContract(string)

CALL
getContract(string)

Parameters

_name // the registered name

Return

the address of the contract or 0x0

removeContractChangeListener(string)

CALL
removeContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

ContractLocatorEnabled

The ContractLocatorEnabled contract is found within the agreements bundle.

contractChanged(string,address,address)

Signals to the implementing contract that the registered contract with the specified name has changed from the old address to the new


setContractLocator(address)

Allows setting the ContractLocator address, if it hadn't been set before. Only the currently registered locator is allowed to replace itself. REVERTS if: - the locator is already set and the msg.sender is not the current locator


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


contractChanged(string,address,address)

CALL
contractChanged(string,address,address)

Parameters

_name // the name under which the contract is known
_newAddress // the new address registered under that name
_oldAddress // the former address registered under that name

setContractLocator(address)

CALL
setContractLocator(address)

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

DataStorage Interface

The DataStorage Interface contract is found within the agreements bundle.

getDataIdAtIndex(uint256)

Returns the data id at the given index


getDataType(bytes32)

Returns the data type of the Data object identified by the given id


getDataValueAsAddress(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsAddressArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBool(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsIntArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsString(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUintArray(bytes32)

Gets the value of the Data object identified by the given id


getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getSize()

Returns the size of the DataMap


removeData(bytes32)

Removes the Data identified by the id from the DataMap, if it exists.


setDataValueAsAddress(bytes32,address)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsAddressArray(bytes32,address[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBool(bytes32,bool)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32(bytes32,bytes32)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32Array(bytes32,bytes32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt(bytes32,int256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsIntArray(bytes32,int256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsString(bytes32,string)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint(bytes32,uint256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUintArray(bytes32,uint256[100])

Creates a Data object with the given value and inserts it into the DataMap


getDataIdAtIndex(uint256)

CALL
getDataIdAtIndex(uint256)

Parameters

_index // the index of the data

Return

error uint error code id bytes32 id of the data

getDataType(bytes32)

CALL
getDataType(bytes32)

Parameters

_id // the id of the data

Return

uint8 the DataType

getDataValueAsAddress(bytes32)

CALL
getDataValueAsAddress(bytes32)

Parameters

_id // the id of the data

Return

address the value of the data

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the id of the data

Return

address[100] the value of the data

getDataValueAsBool(bytes32)

CALL
getDataValueAsBool(bytes32)

Parameters

_id // the id of the data

Return

bool the bool value of the data

getDataValueAsBytes32(bytes32)

CALL
getDataValueAsBytes32(bytes32)

Parameters

_id // the id of the data

Return

bytes32 the value of the data

getDataValueAsBytes32Array(bytes32)

CALL
getDataValueAsBytes32Array(bytes32)

Parameters

_id // the id of the data

Return

bytes32[100] the value of the data

getDataValueAsInt(bytes32)

CALL
getDataValueAsInt(bytes32)

Parameters

_id // the id of the data

Return

int the value of the data

getDataValueAsIntArray(bytes32)

CALL
getDataValueAsIntArray(bytes32)

Parameters

_id // the id of the data

Return

int256[100] the value of the data

getDataValueAsString(bytes32)

CALL
getDataValueAsString(bytes32)

Parameters

_id // the id of the data

Return

string the value of the data

getDataValueAsUint(bytes32)

CALL
getDataValueAsUint(bytes32)

Parameters

_id // the id of the data

Return

uint the value of the data

getDataValueAsUintArray(bytes32)

CALL
getDataValueAsUintArray(bytes32)

Parameters

_id // the id of the data

Return

uint256[100] the value of the data

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_key // the key for the array-type value

Return

the number of non-default entries in the array

getSize()

CALL
getSize()

Return

uint the size

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

setDataValueAsAddress(bytes32,address)

CALL
setDataValueAsAddress(bytes32,address)

Parameters

_id // the id of the data
_value // the address value of the data

setDataValueAsAddressArray(bytes32,address[100])

CALL
setDataValueAsAddressArray(bytes32,address[100])

Parameters

_id // the id of the data
_value // the address[100] value of the data

setDataValueAsBool(bytes32,bool)

CALL
setDataValueAsBool(bytes32,bool)

Parameters

_id // the id of the data
_value // the bool value of the data

setDataValueAsBytes32(bytes32,bytes32)

CALL
setDataValueAsBytes32(bytes32,bytes32)

Parameters

_id // the id of the data
_value // the bytes32 value of the data

setDataValueAsBytes32Array(bytes32,bytes32[100])

CALL
setDataValueAsBytes32Array(bytes32,bytes32[100])

Parameters

_id // the id of the data
_value // the bytes32[100] value of the data

setDataValueAsInt(bytes32,int256)

CALL
setDataValueAsInt(bytes32,int256)

Parameters

_id // the id of the data
_value // the int value of the data

setDataValueAsIntArray(bytes32,int256[100])

CALL
setDataValueAsIntArray(bytes32,int256[100])

Parameters

_id // the id of the data
_value // the int256[100] value of the data

setDataValueAsString(bytes32,string)

CALL
setDataValueAsString(bytes32,string)

Parameters

_id // the id of the data
_value // the string value of the data

setDataValueAsUint(bytes32,uint256)

CALL
setDataValueAsUint(bytes32,uint256)

Parameters

_id // the id of the data
_value // the uint value of the data

setDataValueAsUintArray(bytes32,uint256[100])

CALL
setDataValueAsUintArray(bytes32,uint256[100])

Parameters

_id // the id of the data
_value // the uint[100] value of the data

DataStorageUtils Library

The DataStorageUtils Library contract is found within the agreements bundle.

getDataType(DataStorageUtils.DataMap storage,bytes32)

Returns the DataTypes value for the specified field key from the given map.


getNumberOfArrayEntries(DataStorageUtils.DataMap storage,bytes32,bool)

Returns the number of non-default entries in the array-type field specified in the given DataMap. Empty values are: 0 for int/uint, 0x0 for address, "" for bytes32, etc.) Currently only DataTypes.ADDRESSARRAY() and DataTypes.BYTES32ARRAY() are supported by this function


getNumberOfEntries(address[100],bool)

Returns the number of non-default entries in the given array.


getNumberOfEntries(bytes32[100],bool)

Returns the number of non-default entries in the given array.


keyAtIndex(DataStorageUtils.DataMap storage,uint256)

Returns the ID of the Data at the specified index in the given map


remove(DataStorageUtils.DataMap storage,bytes32)

Removes the Data registered at the specified key in the provided map. The _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


resolveDataLocation(DataStorageUtils.ConditionalData storage,DataStorage)

Resolves the location of a ConditionalData against the provided DataStorage.


resolveDataStorageAddress(bytes32,address,DataStorage)

Returns the address location of a DataStorage contract using the provided information. This is the most basic routine to determine from where to retrieve a data value and uses the same attributes that are encoded in a ConditionalData struct, therefore supporting the handling of ConditionalData structs. The rules of resolving the location are as follows: 1. If an absolute location in the form of a dataStorage address is available, this address is returned 2. If a dataStorageId is provided, it's used as a dataPath to retrieve and return an address from the optional DataStorage parameter. 3. In all other cases, the optional DataStorage parameter is returned. REVERTS if: - for steps 2 and 3 the DataStorage parameter is empty


resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,address)

Resolves an expression where all the relevant parts of the expression are provided as parameters.


resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,bool)

Resolves an expression where all the relevant parts of the expression are provided as parameters.


resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,bytes32)

Resolves an expression where all the relevant parts of the expression are provided as parameters.


resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,int256)

Resolves an expression where all the relevant parts of the expression are provided as parameters.


resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,string)

Resolves an expression where all the relevant parts of the expression are provided as parameters.


resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,uint256)

Resolves an expression where all the relevant parts of the expression are provided as parameters.


getDataType(DataStorageUtils.DataMap storage,bytes32)

CALL
getDataType(DataStorageUtils.DataMap

Parameters

_key // the field key
_map // a DataMap

Return

the uint8 value of the data type

getNumberOfArrayEntries(DataStorageUtils.DataMap storage,bytes32,bool)

CALL
getNumberOfArrayEntries(DataStorageUtils.DataMap

Parameters

_fullscan // if true the array will be scanned to its end, otherwise the function returns on the first encountered default value
_key // a key pointing to a supported array-type field
_map // the DataMap

Return

the number of non-default entries

getNumberOfEntries(address[100],bool)

CALL
getNumberOfEntries(address[100],bool)

Parameters

_array // the array to scan
_fullscan // whether to keep scanning to the end even if default values are encountered

Return

the number of non-empty entries in the array

getNumberOfEntries(bytes32[100],bool)

CALL
getNumberOfEntries(bytes32[100],bool)

Parameters

_array // the array to scan
_fullscan // whether to keep scanning to the end even if default values are encountered

Return

the number of non-empty entries in the array

keyAtIndex(DataStorageUtils.DataMap storage,uint256)

CALL
keyAtIndex(DataStorageUtils.DataMap

remove(DataStorageUtils.DataMap storage,bytes32)

CALL
remove(DataStorageUtils.DataMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

resolveDataLocation(DataStorageUtils.ConditionalData storage,DataStorage)

CALL
resolveDataLocation(DataStorageUtils.ConditionalData

Parameters

_conditionalData // a ConditionalData with instructions how to find the desired data
_dataStorage // a DataStorage contract to use as a basis for the resolution

Return

the address of a DataStorage and a dataPath are returned that pinpoint the resolved data location

resolveDataStorageAddress(bytes32,address,DataStorage)

CALL
resolveDataStorageAddress(bytes32,address,DataStorage)

Parameters

_dataStorage // the absolute address of a DataStorage
_dataStorageId // a path by which an address can be retrieved from a DataStorage
_refDataStorage // an optional DataStorge required to determine an address, if no absolute address was provided

Return

the address of a DataStorage

resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,address)

CALL
resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,address)

Parameters

_dataId // an optional dataId which if supplied is then used to find a different DataStorage where the target data is located
_dataPath // a dataPath where the target data is located
_dataStorage // a DataStorage contract where the target data is located
_op // a valid comparison operator 
_value // a address value to use as right-hand value to compare against the target data

Return

boolean result of the comparison

resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,bool)

CALL
resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,bool)

Parameters

_dataId // an optional dataId which if supplied is then used to find a different DataStorage where the target data is located
_dataPath // a dataPath where the target data is located
_dataStorage // a DataStorage contract where the target data is located
_op // a valid comparison operator 
_value // a bool value to use as right-hand value to compare against the target data

Return

boolean result of the comparison

resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,bytes32)

CALL
resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,bytes32)

Parameters

_dataId // an optional dataId which if supplied is then used to find a different DataStorage where the target data is located
_dataPath // a dataPath where the target data is located
_dataStorage // a DataStorage contract where the target data is located
_op // a valid comparison operator 
_value // a bytes32 value to use as right-hand value to compare against the target data

Return

boolean result of the comparison

resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,int256)

CALL
resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,int256)

Parameters

_dataId // an optional dataId which if supplied is then used to find a different DataStorage where the target data is located
_dataPath // a dataPath where the target data is located
_dataStorage // a DataStorage contract where the target data is located
_op // a valid comparison operator 
_value // a uint value to use as right-hand value to compare against the target data

Return

boolean result of the comparison

resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,string)

CALL
resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,string)

Parameters

_dataId // an optional dataId which if supplied is then used to find a different DataStorage where the target data is located
_dataPath // a dataPath where the target data is located
_dataStorage // a DataStorage contract where the target data is located
_op // a valid comparison operator 
_value // a string value to use as right-hand value to compare against the target data

Return

boolean result of the comparison

resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,uint256)

CALL
resolveExpression(DataStorage,bytes32,bytes32,DataStorageUtils.COMPARISON_OPERATOR,uint256)

Parameters

_dataId // an optional dataId which if supplied is then used to find a different DataStorage where the target data is located
_dataPath // a dataPath where the target data is located
_dataStorage // a DataStorage contract where the target data is located
_op // a valid comparison operator 
_value // a uint value to use as right-hand value to compare against the target data

Return

boolean result of the comparison

DbInterchangeable

The DbInterchangeable contract is found within the agreements bundle.

acceptDatabase(address)

Allows the implementing contract to accept a database contract as its backend.


acceptDatabase(address)

CALL
acceptDatabase(address)

Parameters

_db // the address of a contract to use as database

Return

true if the database was successfully set, false otherwise

DefaultActiveAgreement Interface

The DefaultActiveAgreement Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the specified listener to the specified event.


cancel()

Registers the msg.sender as having canceled the agreement. During formation (legal states DRAFT and FORMULATED), the agreement can canceled unilaterally by one of the parties to the agreement. During execution (legal state EXECUTED), the agreement can only be canceled if all parties agree to do so by invoking this function. REVERTS if: - the caller could not be authorized (see AgreementsAPI.authorizePartyActor())


getAddressScopeDetails(address,bytes32)

Returns details about the configuration of the address scope.


getAddressScopeDetailsForKey(bytes32)

Returns details about the configuration of the address scope.


getAddressScopeKeys()

Returns the list of keys identifying the address/context scopes.


getArchetype()

Returns the archetype


getCreator()

Returns the creator


getDataValueAsAddressArray(bytes32)

Overriden method of DataStorage to return the agreement parties for special ID DATA_FIELD_AGREEMENT_PARTIES.


getEventLogReference()

Returns the Hoard Address and Hoard Secret for the Event Log


getGoverningAgreementAtIndex(uint256)

Retrieves the address for the governing agreement at the specified index


getGoverningAgreementData(address)

Returns information about the governing agreement with the specified address


getHoardAddress()

Returns the Hoard Address


getHoardSecret()

Returns the Hoard Secret


getLegalState()

Returns the legal state of this agreement


getMaxNumberOfEvents()

Returns the max number of events for the event log


getName()

Gets name


getNumberOfArrayEntries(bytes32,bool)

Overridden method of DataStorage to return the number of parties for special ID DATA_FIELD_AGREEMENT_PARTIES.


getNumberOfGoverningAgreements()

Returns the number governing agreements for this agreement


getNumberOfParties()

Gets number of parties


getPartyAtIndex(uint256)

Returns the party at the given index


getSignatureDetails(address)

Returns the signee and timestamp of the signature of the given party.


isPrivate()

Returns the private flag


isSignedBy(address)

Returns whether the given account's signature is on the agreement.


removeData(bytes32)

Removes the Data identified by the id from the DataMap, if it exists.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the specified listener from the list of listeners for the specified event.


resolveAddressScope(address,bytes32,address)

Returns the scope qualifier for the given address. If the scope depends on a ConditionalData, the function will attempt to resolve it using the provided DataStorage address. REVERTS if: - the scope is defined by a ConditionalData, but the DataStorage parameter is empty


setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Associates the given address with a scope qualifier for a given context. The context can be used to bind the same address to different scenarios and different scopes. The scope can either be represented by a fixed bytes32 value of by a ConditionalData that resolves to a bytes32 field. REVERTS if: - the given address is empty - neither the scope nor valid ConditionalData parameters are provided


setEventLogReference(bytes32,bytes32)

Sets the Hoard Address and Hoard Secret for the Event Log


setFulfilled()

Sets the legal state of this agreement to Agreements.LegalState.FULFILLED. Note: All other legal states are set by internal logic.


sign()

Applies the msg.sender or tx.origin as a signature to this agreement, if it can be authorized as a valid signee. The timestamp of an already existing signature is not overwritten in case the agreement is signed again! REVERTS if: - the caller could not be authorized (see AgreementsAPI.authorizePartyActor())


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

cancel()

CALL
cancel()

getAddressScopeDetails(address,bytes32)

CALL
getAddressScopeDetails(address,bytes32)

Parameters

_address // an address
_context // a context declaration binding the address to a scope

Return

fixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeDetailsForKey(bytes32)

CALL
getAddressScopeDetailsForKey(bytes32)

Parameters

_key // a scope key

Return

keyAddress - the address encoded in the keykeyContext - the context encoded in the keyfixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeKeys()

CALL
getAddressScopeKeys()

Return

the bytes32 scope keys

getArchetype()

CALL
getArchetype()

Return

the archetype address 

getCreator()

CALL
getCreator()

Return

the creator address

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the bytes32 ID of an address array

Return

the address array

getEventLogReference()

CALL
getEventLogReference()

Return

the Hoard Address and Hoard Secret for the Event Log

getGoverningAgreementAtIndex(uint256)

CALL
getGoverningAgreementAtIndex(uint256)

Parameters

_index // the index position

Return

the address for the governing agreement

getGoverningAgreementData(address)

CALL
getGoverningAgreementData(address)

Parameters

_agreement // the governing agreement address

Return

the name of the governing agreement

getHoardAddress()

CALL
getHoardAddress()

Return

the Hoard Address

getHoardSecret()

CALL
getHoardSecret()

Return

the Hoard Secret

getLegalState()

CALL
getLegalState()

Return

the Agreements.LegalState as a uint

getMaxNumberOfEvents()

CALL
getMaxNumberOfEvents()

Return

the max number of events for the event log

getName()

CALL
getName()

Return

name name

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // whether to scan beyond non-default values
_id // the ID of the data field

Return

the size of the specified array

getNumberOfGoverningAgreements()

CALL
getNumberOfGoverningAgreements()

Return

the number of governing agreements

getNumberOfParties()

CALL
getNumberOfParties()

Return

size number of parties

getPartyAtIndex(uint256)

CALL
getPartyAtIndex(uint256)

Parameters

_index // the index position

Return

the party's address or 0x0 if the index is out of bounds

getSignatureDetails(address)

CALL
getSignatureDetails(address)

Parameters

_party // the signing party

Return

the address of the signee (if the party authorized a signee other than itself)the time of signing or 0 if the address is not a party to this agreement or has not signed yet

isPrivate()

CALL
isPrivate()

Return

the private flag 

isSignedBy(address)

CALL
isSignedBy(address)

Parameters

_signee // The account to check

Return

true if the provided address is a recorded signature on the agreement, false otherwise

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

resolveAddressScope(address,bytes32,address)

CALL
resolveAddressScope(address,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataStorage // a DataStorage contract to use as a basis if the scope is defined by a ConditionalData

Return

the scope qualifier or an empty bytes32, if no qualifier is set or cannot be determined

setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

CALL
setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataPath // the dataPath of a ConditionalData defining the scope
_dataStorage // the dataStorgage address of a ConditionalData defining the scope
_dataStorageId // the dataStorageId of a ConditionalData defining the scope
_fixedScope // a bytes32 representing a fixed scope

setEventLogReference(bytes32,bytes32)

CALL
setEventLogReference(bytes32,bytes32)

setFulfilled()

CALL
setFulfilled()

sign()

CALL
sign()

DefaultActiveAgreementRegistry Interface

The DefaultActiveAgreementRegistry Interface contract is found within the agreements bundle.

acceptDatabase(address)

Implementation of DbInterchangeable.acceptDatabase(address). Sets the provided database as this contract's database, if this contract has been granted system ownership of the database. This function can only be called from the upgradeOwner or from another contract that shares the same upgradeOwner (the second scenario applies when the database is migrated from a previous version as part of an upgrade). REVERTS if: - the msg.sender is neither the uprade owner nor another UpgradeOwned contract with the same upgrade owner


addAgreementToCollection(bytes32,address)

Adds an agreement to given collection


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


contractChanged(string,address,address)

Implements ContractLocatorEnabled.setContractLocator(address)


createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32,address[])

Creates an Active Agreement with the given parameters


createAgreementCollection(string,address,uint8,bytes32)

Creates a new agreement collection


createUserAccount(address,bytes32,address,address)

Creates an AgreementPartyAccount with the specified parameters and adds it to the ParticipantsManager


eventFired(bytes32,address)

Overwrites AbstractEventListener function to receive updates from ActiveAgreements that are registered in this registry. Currently supports AGREEMENT_STATE_CHANGED and EVENT_LOG_UPDATED


eventFired(bytes32,address,address)

Overwrites AbstractEventListener function to receive updates from ActiveAgreements that are registered in this registry. Currently unused parameters were unnamed to avoid compiler warnings: param _source the address of the source of the event. (optional, only needed if the source differs from msg.sender)


eventFired(bytes32,address,bytes32)

See EventListener.eventFired(bytes32,address,bytes32)


eventFired(bytes32,address,bytes32,address)

See EventListener.eventFired(bytes32,address,bytes32,address)


eventFired(bytes32,address,string)

See EventListener.eventFired(bytes32,address,string)


eventFired(bytes32,address,uint256)

See EventListener.eventFired(bytes32,address,uint)


getActiveAgreementAtIndex(uint256)

Gets the ActiveAgreement address at given index


getActiveAgreementData(address)

Returns data about the ActiveAgreement at the specified address


getActiveAgreementsSize()

Gets number of activeAgreements


getAgreementAtIndexInCollection(bytes32,uint256)

Gets agreement address at index in colelction


getAgreementCollectionAtIndex(uint256)

Gets collection id at index


getAgreementCollectionData(bytes32)

Gets collection data by id


getAgreementDataInCollection(bytes32,address)

Get agreement data by collection id and agreement address Currently unused parameters were unnamed to avoid compiler warnings: param _id id of the collection


getAgreementParameterAtIndex(address,uint256)

Returns the ID of the agreement parameter value at the given index.


getAgreementParameterDetails(address,bytes32)

Returns information about the process data entry for the specified process and data ID


getArchetypeRegistry()

Returns the ArchetypeRegistry address


getBpmService()

Returns the BpmService address


getGoverningAgreementAtIndex(address,uint256)

Retrieves the address for the governing agreement at the specified index


getGoverningAgreementData(address,address)

Returns information about the governing agreement with the specified address


getNumberOfAgreementCollections()

Gets number of agreement collections


getNumberOfAgreementParameters(address)

Returns the number of agreement parameter values.


getNumberOfAgreementsInCollection(bytes32)

Gets number of agreements in given collection


getNumberOfGoverningAgreements(address)

Returns the number governing agreements for given agreement


getPartiesByActiveAgreementSize(address)

Gets parties size for given Active Agreement


getPartyByActiveAgreementAtIndex(address,uint256)

Gets getPartyByActiveAgreementAtIndex


getPartyByActiveAgreementData(address,address)

Returns data about the given party's signature on the specified agreement.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


migrateFrom(address)

Empty implementation of Migratable.migrateFrom(address).


migrateTo(address)

Implementation of Migratable.migrateTo(address) that transfers system ownership of the database in this contract to the successor and calls DbInterchangeable.acceptDatabase(address) on the successor. REVERTS if: - the database contract was not accepted by the successor


minor()

returns the minor version number


patch()

returns the patch version number


processStateChanged(address)


setContractLocator(address)

Overrides ContractLocatorEnabled.setContractLocator(address)


setEventLogReference(address,bytes32,bytes32)

Updates the hoard address and secret for the event log of the specified agreement


startFormation(address)

Creates a starts a ProcessInstance to handle the formation workflow as defined by the given agreement's archetype.


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


transferAddressScopes(address)

Sets address scopes on the given ProcessInstance based on the scopes defined in the ActiveAgreement referenced in the ProcessInstance. Address scopes relying on a ConditionalData configuration are translated, so they work from the POV of the ProcessInstance. This function ensures that any scopes (roles) set for user/organization addresses on the agreement are available and adhered to in the process in the context of activities. Each scope on the agreement is examined whether its data field context is connected to a model participant (swimlane) in the ProcessDefinition/ProcessModel that guides the ProcessInstance. If a match is found, the activity definitions in the ProcessInstance that are connected (assigned) to the participant are used as contexts to set up address scopes on the ProcessInstance. This function performs a crucial translation of role restrictions specified on the agreement to make sure the same qualifications are available when performing user tasks using organizational scopes (departments). Example (address + context = scope): Address scope on the agreement using a data field context: 0x94EcB18404251B0C8E88B0D8fbde7145c72AEC22 + "Buyer" = "LogisticsDepartment" Address scope on the ProcessInstance using an activity context: 0x94EcB18404251B0C8E88B0D8fbde7145c72AEC22 + "ApproveOrder" = "LogisticsDepartment" REVERTS if: - the ProcessInstance is not in state CREATED - the provided ProcessInstance does not have an ActiveAgreement set under DATA_ID_AGREEMENT


transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull) REVERTS if: - Either migrateTo or migrateFrom were not successful


acceptDatabase(address)

CALL
acceptDatabase(address)

Parameters

_db // the database contract

Return

true if it was accepted, false otherwise

addAgreementToCollection(bytes32,address)

CALL
addAgreementToCollection(bytes32,address)

Parameters

_agreement // agreement address Reverts if collection is not found
_collectionId // the bytes32 collection id

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

contractChanged(string,address,address)

CALL
contractChanged(string,address,address)

createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32,address[])

CALL
createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32,address[])

Parameters

_archetype // archetype
_collectionId // id of agreement collection (optional)
_creator // address
_eventLogHoardAddress // Address of events log in hoard
_eventLogHoardSecret // Secret for hoard retrieval
_governingAgreements // array of agreement addresses which govern this agreement (optional)
_hoardAddress // Address of agreement params in hoard
_hoardSecret // Secret for hoard retrieval
_isPrivate // agreement is private
_maxNumberOfEvents // Max number of events allowed
_name // name
_parties // parties array

Return

activeAgreement - the new ActiveAgreement's address, if successfully created, 0x0 otherwise Reverts if:	Agreement name or archetype address is empty	Duplicate governing agreements are passed	Agreement address is already registered	Given collectionId does not exist

createAgreementCollection(string,address,uint8,bytes32)

CALL
createAgreementCollection(string,address,uint8,bytes32)

Parameters

_author // address of author
_name // name

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED(), BaseErrors.RESOURCE_ALREADY_EXISTS()id bytes32 id of package

createUserAccount(address,bytes32,address,address)

CALL
createUserAccount(address,bytes32,address,address)

Parameters

_accountsManager // the ParticipantsManager address
_ecosystem // the address of an Ecosystem to which the user account is connected
_id // an identifier for the user
_owner // the owner of the user account

Return

error BaseErrors.RESOURCE_ALREADY_EXISTS() or BaseErrors.NO_ERROR()userAccount user account address, or 0x0 if not successful

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the address payload of the event
_event // the event identifier

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

eventFired(bytes32,address,bytes32,address)

CALL
eventFired(bytes32,address,bytes32,address)

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

getActiveAgreementAtIndex(uint256)

CALL
getActiveAgreementAtIndex(uint256)

Parameters

_index // the index position

Return

the Active Agreement address

getActiveAgreementData(address)

CALL
getActiveAgreementData(address)

Parameters

_activeAgreement // Active Agreement

Return

archetype - the agreement's archetype adressname - the name of the agreementcreator - the creator of the agreementhoardAddress - address of the agreement parameters in hoard (only used when agreement is private)hoardSecret - secret for retrieval of hoard parameterseventLogHoardAddress - address of the agreement's event log in hoardeventLogHoardSecret - secret for retrieval of the hoard event log filemaxNumberOfEvents - the maximum number of events allowed to be stored for this agreementisPrivate - whether the agreement's parameters are private, i.e. stored off-chain in hoardlegalState - the agreement's Agreement.LegalState as uint8formationProcessInstance - the address of the process instance representing the formation of this agreementexecutionProcessInstance - the address of the process instance representing the execution of this agreement

getActiveAgreementsSize()

CALL
getActiveAgreementsSize()

Return

size size

getAgreementAtIndexInCollection(bytes32,uint256)

CALL
getAgreementAtIndexInCollection(bytes32,uint256)

Parameters

_id // id of the collection
_index // uint index

Return

agreement address of archetype

getAgreementCollectionAtIndex(uint256)

CALL
getAgreementCollectionAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getAgreementCollectionData(bytes32)

CALL
getAgreementCollectionData(bytes32)

Parameters

_id // bytes32 collection id

Return

name stringauthor addresscollectionType type of collectionpackageId id of the archetype package

getAgreementDataInCollection(bytes32,address)

CALL
getAgreementDataInCollection(bytes32,address)

Parameters

_agreement // address of agreement

Return

agreementName name of agreementarchetype address of archetype

getAgreementParameterAtIndex(address,uint256)

CALL
getAgreementParameterAtIndex(address,uint256)

Parameters

_pos // the index

Return

the parameter ID

getAgreementParameterDetails(address,bytes32)

CALL
getAgreementParameterDetails(address,bytes32)

Parameters

_address // the active agreement
_dataId // the parameter ID

Return

(process,id,uintValue,bytes32Value,addressValue,boolValue)

getArchetypeRegistry()

CALL
getArchetypeRegistry()

Return

address the ArchetypeRegistry

getBpmService()

CALL
getBpmService()

Return

address the BpmService

getGoverningAgreementAtIndex(address,uint256)

CALL
getGoverningAgreementAtIndex(address,uint256)

Parameters

_agreement // the address of the agreement
_index // the index position

Return

the address for the governing agreement

getGoverningAgreementData(address,address)

CALL
getGoverningAgreementData(address,address)

Parameters

_agreement // the agreement address
_governingAgreement // the governing agreement address

Return

the name of the governing agreement

getNumberOfAgreementCollections()

CALL
getNumberOfAgreementCollections()

Return

size size

getNumberOfAgreementParameters(address)

CALL
getNumberOfAgreementParameters(address)

Return

the number of parameters

getNumberOfAgreementsInCollection(bytes32)

CALL
getNumberOfAgreementsInCollection(bytes32)

Parameters

_id // id of the collection

Return

size agreement count

getNumberOfGoverningAgreements(address)

CALL
getNumberOfGoverningAgreements(address)

Return

the number of governing agreements

getPartiesByActiveAgreementSize(address)

CALL
getPartiesByActiveAgreementSize(address)

Parameters

_activeAgreement // Active Agreement

Return

the number of parties

getPartyByActiveAgreementAtIndex(address,uint256)

CALL
getPartyByActiveAgreementAtIndex(address,uint256)

Parameters

_activeAgreement // Active Agreement
_index // index

Return

the party address or 0x0 if the index is out of bounds

getPartyByActiveAgreementData(address,address)

CALL
getPartyByActiveAgreementData(address,address)

Parameters

_activeAgreement // the ActiveAgreement
_party // the signing party

Return

signedBy the actual signature authorized by the partysignatureTimestamp the timestamp when the party has signed, or 0 if not signed yet

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Return

always true

migrateTo(address)

CALL
migrateTo(address)

Parameters

_successor // the successor contract to which to migrate the database

Return

true if the database was successfully accepted by the successor, otherwise a REVERT is triggered to rollback the change of system ownership.

minor()

CALL
minor()

patch()

CALL
patch()

processStateChanged(address)

CALL
processStateChanged(address)

Parameters

_processInstance // the process instance whose state has changed

setContractLocator(address)

CALL
setContractLocator(address)

setEventLogReference(address,bytes32,bytes32)

CALL
setEventLogReference(address,bytes32,bytes32)

Parameters

_activeAgreement // Address of active agreement
_eventLogHoardAddress // New hoard address of event log for agreement
_eventLogHoardSecret // New hoard secret key of event log for agreement

startFormation(address)

CALL
startFormation(address)

Parameters

_agreement // an ActiveAgreement

Return

error - BaseErrors.INVALID_PARAM_STATE() if the agreement is not in legal state FORMULATEDerror - BaseErrors.OVERWRITE_NOT_ALLOWED() if there is an ongoing formation process for the agreementerror - BaseErrors.NO_ERROR() if the formation process was started successfully, or a different error code if there were problems in the processthe address of the ProcessInstance, if successful

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

transferAddressScopes(address)

CALL
transferAddressScopes(address)

Parameters

_processInstance // the ProcessInstance being configured

transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a Versioned contract that replaces this one

Return

true if the upgrade was successful, otherwise a REVERT is triggered to rollback any changes from the upgrade

DefaultArchetype

The DefaultArchetype contract is found within the agreements bundle.

activate()

Activates this archetype


addDocument(bytes32,bytes32,bytes32)

Adds document


addJurisdiction(bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations. If the region is empty, the jurisdiction will only reference the country and the regions will be emptied, i.e. any prior regions for that country will be removed.


addParameter(uint8,bytes32)

Adds parameter


deactivate()

Deactivates this archetype


getAuthor()

Gets Author


getDescription()

Gets description


getDocument(bytes32)

Gets document with given name


getDocumentAtIndex(uint256)

Gets document name at index


getExecutionProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement execution.


getFormationProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement formation.


getGoverningArchetypeAtIndex(uint256)

Retrieves the address for the governing archetype at the specified index


getGoverningArchetypeData(address)

Returns information about the governing archetype with the specified address


getGoverningArchetypes()

Returns all governing archetype address for this archetype


getJurisdictionAtIndex(uint256)

Retrieves the key for the jurisdiction at the specified index


getJurisdictionData(bytes32)

Returns information about the jurisdiction with the specified key


getName()

Returns the archetype name


getNumberOfDocuments()

Gets number of documents


getNumberOfGoverningArchetypes()

Returns the number governing archetypes for this archetype


getNumberOfJurisdictions()

Returns the number jurisdictions for this archetype


getNumberOfParameters()

Gets number of parameters


getParameterAtIndex(uint256)

Gets parameter at index


getParameterDetails(bytes32)

Gets parameter data type


getPrice()

Gets price


getSuccessor()

Returns the successor of this archetype


isActive()

Returns the active state


isPrivate()

Returns the private state


setPrice(uint256)

Sets price


setSuccessor(address)

Sets the successor this archetype. Setting a successor automatically deactivates this archetype. Fails if given successor is the same address as itself. Fails if intended action will lead to two archetypes with their successors pointing to each other.


activate()

CALL
activate()

addDocument(bytes32,bytes32,bytes32)

CALL
addDocument(bytes32,bytes32,bytes32)

Parameters

_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS() if _name already exists in documentNames

addJurisdiction(bytes2,bytes32)

CALL
addJurisdiction(bytes2,bytes32)

Parameters

_country // a ISO- code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

BaseErrors.NO_ERROR() if successful, and key of jurisdiction just added
BaseErrors.INVALID_PARAM_VALUE() if _country is not in the DataTypes enum,

addParameter(uint8,bytes32)

CALL
addParameter(uint8,bytes32)

Parameters

_parameterName // parameter name
_parameterType // parameter type (enum)

Return

BaseErrors.NO_ERROR() if successful,
BaseErrors.NULL_PARAM_NOT_ALLOWED() if _parameter is empty,
BaseErrors.RESOURCE_ALREADY_EXISTS() if _parameter already exists

deactivate()

CALL
deactivate()

getAuthor()

CALL
getAuthor()

Return

author author

getDescription()

CALL
getDescription()

Return

description

getDocument(bytes32)

CALL
getDocument(bytes32)

Parameters

_name // document name

Return

error BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND() if documentsNames does not contain _namehoardAddress hoard addresssecretKey secret key

getDocumentAtIndex(uint256)

CALL
getDocumentAtIndex(uint256)

Parameters

_index // index

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsname

getExecutionProcessDefinition()

CALL
getExecutionProcessDefinition()

Return

the address of a ProcessDefinition

getFormationProcessDefinition()

CALL
getFormationProcessDefinition()

Return

the address of a ProcessDefinition

getGoverningArchetypeAtIndex(uint256)

CALL
getGoverningArchetypeAtIndex(uint256)

Parameters

_index // the index position

Return

the address for the governing archetype

getGoverningArchetypeData(address)

CALL
getGoverningArchetypeData(address)

Parameters

_archetype // the governing archetype address

Return

the name of the governing archetype

getGoverningArchetypes()

CALL
getGoverningArchetypes()

Return

the address array containing all governing archetypes

getJurisdictionAtIndex(uint256)

CALL
getJurisdictionAtIndex(uint256)

Parameters

_index // the index position

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsthe key of the jurisdiction or an empty bytes32 if the index was out of bounds

getJurisdictionData(bytes32)

CALL
getJurisdictionData(bytes32)

Parameters

_key // the key identifying the jurisdiction

Return

the country and region identifiers (see IsoCountries), if the jurisdiction exists

getName()

CALL
getName()

Return

the name

getNumberOfDocuments()

CALL
getNumberOfDocuments()

Return

size number of documents

getNumberOfGoverningArchetypes()

CALL
getNumberOfGoverningArchetypes()

Return

the number of governing archetypes

getNumberOfJurisdictions()

CALL
getNumberOfJurisdictions()

Return

the number of jurisdictions

getNumberOfParameters()

CALL
getNumberOfParameters()

Return

size number of parameters

getParameterAtIndex(uint256)

CALL
getParameterAtIndex(uint256)

Parameters

_index // index

Return

error error TBDparameter parameter

getParameterDetails(bytes32)

CALL
getParameterDetails(bytes32)

Parameters

_parameter // parameter

Return

error error TBDposition index of parameterparameterType parameter type

getPrice()

CALL
getPrice()

Return

price

getSuccessor()

CALL
getSuccessor()

Return

address of successor archetype

isActive()

CALL
isActive()

Return

true if active, false otherwise

isPrivate()

CALL
isPrivate()

Return

true if private, false otherwise

setPrice(uint256)

CALL
setPrice(uint256)

Parameters

_price // price of archetype

setSuccessor(address)

CALL
setSuccessor(address)

Parameters

_successor // address of successor archetype

DefaultArchetypeRegistry

The DefaultArchetypeRegistry contract is found within the agreements bundle.

acceptDatabase(address)

Implementation of DbInterchangeable.acceptDatabase(address). Sets the provided database as this contract's database, if this contract has been granted system ownership of the database. This function can only be called from the upgradeOwner or from another contract that shares the same upgradeOwner (the second scenario applies when the database is migrated from a previous version as part of an upgrade). REVERTS if: - the msg.sender is neither the uprade owner nor another UpgradeOwned contract with the same upgrade owner


activate(address,address)

Sets active to true for given archetype


activatePackage(bytes32,address)

Sets active to true for given archetype package


addArchetypeToPackage(bytes32,address)

Adds archetype to package


addDocument(address,bytes32,bytes32,bytes32)

Adds Hoard document to the given Archetype


addJurisdiction(address,bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations.


addJurisdictions(address,bytes2[],bytes32[])

Adds the given jurisdictions in the form of a country codes and region identifiers to this archetype. References codes defined via IsoCountries interface implementations.


addParameter(address,uint8,bytes32)

Adds parameter to archetype


addParameters(address,uint8[],bytes32[])

Adds the specified parameters to the archetype. If one of the parameters cannot be added, the operation aborts and returns that error code.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createArchetype(bytes32,address,string,uint256,bool,bool,address,address,bytes32,address[])

Creates a new archetype


createArchetypePackage(string,string,address,bool,bool)

Adds a new archetype package


deactivate(address,address)

Sets active to false for given archetype


deactivatePackage(bytes32,address)

Sets active to false for given archetype package


getArchetypeAtIndex(uint256)

Gets archetype address at given index


getArchetypeAtIndexInPackage(bytes32,uint256)

Gets archetype address at index in package


getArchetypeData(address)

Returns data about an archetype


getArchetypeDataInPackage(bytes32,address)

Get archetype data by package id and archetype address Currently unused parameters were unnamed to avoid compiler warnings: param _id id of the package


getArchetypePackageAtIndex(uint256)

Gets package id at index


getArchetypePackageData(bytes32)

Gets package data by id


getArchetypeSuccessor(address)

Returns archetype successor


getArchetypesSize()

Gets number of archetypes


getDocumentByArchetypeAtIndex(address,uint256)

Gets document name by Archetype At index


getDocumentByArchetypeData(address,bytes32)

Returns data about the document at the specified address


getDocumentsByArchetypeSize(address)

Gets documents size for given Archetype


getGoverningArchetypeAtIndex(address,uint256)

Retrieves the address of governing archetype at the specified index


getGoverningArchetypeData(address,address)

Returns information about the governing archetype with the specified address


getJurisdictionAtIndexForArchetype(address,uint256)

Returns the jurisdiction key at the specified index for the given archetype


getJurisdictionDataForArchetype(address,bytes32)

Returns data about the jurisdiction with the specified key in the given archetype


getNumberOfArchetypePackages()

Gets number of archetype packages


getNumberOfArchetypesInPackage(bytes32)

Gets number of archetypes in given package


getNumberOfGoverningArchetypes(address)

Returns the number governing archetypes for the given archetype


getNumberOfJurisdictionsForArchetype(address)

Returns the number of jurisdictions for the given Archetype


getParameterByArchetypeAtIndex(address,uint256)

Gets parameter name by Archetype At index


getParameterByArchetypeData(address,bytes32)

Returns data about the parameter at with the specified name


getParametersByArchetypeSize(address)

Gets parameter count for given Archetype


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


migrateFrom(address)

Empty implementation of Migratable.migrateFrom(address).


migrateTo(address)

Implementation of Migratable.migrateTo(address) that transfers system ownership of the database in this contract to the successor and calls DbInterchangeable.acceptDatabase(address) on the successor. REVERTS if: - the database contract was not accepted by the successor


minor()

returns the minor version number


packageHasArchetype(bytes32,address)

Determines whether given archetype address is in the package identified by the packageId


patch()

returns the patch version number


setArchetypePrice(address,uint256)

Sets price of given archetype


setArchetypeSuccessor(address,address,address)

Sets archetype successor


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull) REVERTS if: - Either migrateTo or migrateFrom were not successful


acceptDatabase(address)

CALL
acceptDatabase(address)

Parameters

_db // the database contract

Return

true if it was accepted, false otherwise

activate(address,address)

CALL
activate(address,address)

Parameters

_archetype // address of archetype
_author // address of author (must match the author of the archetype in order to activate)

activatePackage(bytes32,address)

CALL
activatePackage(bytes32,address)

Parameters

_author // address of author (must match the author of the archetype package in order to activate)
_id // bytes32 id of archetype package

addArchetypeToPackage(bytes32,address)

CALL
addArchetypeToPackage(bytes32,address)

Parameters

_archetype // the archetype address Reverts if package is not found
_packageId // the bytes32 package id

addDocument(address,bytes32,bytes32,bytes32)

CALL
addDocument(address,bytes32,bytes32,bytes32)

Parameters

_archetype // archetype
_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() _archetype does not exist, or see DefaultArchetype

addJurisdiction(address,bytes2,bytes32)

CALL
addJurisdiction(address,bytes2,bytes32)

Parameters

_country // a ISO-3166-1 code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

BaseErrors.NO_ERROR() if succesfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundany error returned from the Archetype.addJurisdiction() function

addJurisdictions(address,bytes2[],bytes32[])

CALL
addJurisdictions(address,bytes2[],bytes32[])

Parameters

_countries // an array of a ISO-3166-1 code, e.g. 'US'
_regions // an array of region identifiers from a IsoCountries contract

Return

BaseErrors.NO_ERROR() if succesfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundBaseErrors.INVALID_PARAM_STATE() if the lengths of the two arrays don't match

addParameter(address,uint8,bytes32)

CALL
addParameter(address,uint8,bytes32)

Parameters

_archetype // the archetype address
_parameterName // the parameter name
_parameterType // data type (enum)

Return

BaseErrors.NO_ERROR() if successfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundany error returned from the Archetype.addParameter() function

addParameters(address,uint8[],bytes32[])

CALL
addParameters(address,uint8[],bytes32[])

Parameters

_archetype // the archetype address
_parameterNames // the parameter names
_parameterTypes // the parameter types

Return

BaseErrors.NO_ERROR() if succesfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundBaseErrors.INVALID_PARAM_STATE() if the lengths of the two arrays don't match

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createArchetype(bytes32,address,string,uint256,bool,bool,address,address,bytes32,address[])

CALL
createArchetype(bytes32,address,string,uint256,bool,bool,address,address,bytes32,address[])

Parameters

_active // determines if this archetype is active
_author // author
_description // description
_executionProcess // the address of a ProcessDefinition that orchestrates the agreement execution
_formationProcess // the address of a ProcessDefinition that orchestrates the agreement formation
_governingArchetypes // array of archetype addresses which govern this archetype (optional)
_isPrivate // determines if the archetype's documents are encrypted
_name // name
_packageId // id of package this archetype is part of (optional)
_price // price

Return

archetype - the new archetype's address, if successfully created Reverts if archetype address is already registered

createArchetypePackage(string,string,address,bool,bool)

CALL
createArchetypePackage(string,string,address,bool,bool)

Parameters

_active // makes it a inactive package
_author // address of author (user account of organization)
_description // description
_isPrivate // makes it a private package visible to only the author
_name // name

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED(), BaseErrors.RESOURCE_ALREADY_EXISTS()id bytes32 id of package

deactivate(address,address)

CALL
deactivate(address,address)

Parameters

_archetype // address of archetype
_author // address of author (must match the author of the archetype in order to deactivate)

deactivatePackage(bytes32,address)

CALL
deactivatePackage(bytes32,address)

Parameters

_author // address of author (must match the author of the archetype package in order to deactivate)
_id // bytes32 id of archetype package

getArchetypeAtIndex(uint256)

CALL
getArchetypeAtIndex(uint256)

Parameters

_index // index

Return

archetype archetype

getArchetypeAtIndexInPackage(bytes32,uint256)

CALL
getArchetypeAtIndexInPackage(bytes32,uint256)

Parameters

_id // id of the package
_index // uint index

Return

archetype address of archetype

getArchetypeData(address)

CALL
getArchetypeData(address)

Parameters

_archetype // the archetype address

Return

name namedescription descriptionprice priceauthor author addressactive boolisPrivate boolsuccessor addressformationProcessIdformationProcessDefinitionexecutionProcessIdexecutionProcessDefinition

getArchetypeDataInPackage(bytes32,address)

CALL
getArchetypeDataInPackage(bytes32,address)

Parameters

_archetype // address of archetype

Return

archetypeName name of archetype

getArchetypePackageAtIndex(uint256)

CALL
getArchetypePackageAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getArchetypePackageData(bytes32)

CALL
getArchetypePackageData(bytes32)

Parameters

_id // bytes32 package id

Return

name stringdescription stringauthor addressisPrivate boolactive bool

getArchetypeSuccessor(address)

CALL
getArchetypeSuccessor(address)

Parameters

_archetype // address of archetype

Return

address address of successor

getArchetypesSize()

CALL
getArchetypesSize()

Return

size size

getDocumentByArchetypeAtIndex(address,uint256)

CALL
getDocumentByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getDocumentByArchetypeData(address,bytes32)

CALL
getDocumentByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

_hoardAddress hoard address_secretKey secret key

getDocumentsByArchetypeSize(address)

CALL
getDocumentsByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

getGoverningArchetypeAtIndex(address,uint256)

CALL
getGoverningArchetypeAtIndex(address,uint256)

Parameters

_archetype // the address of the archetype
_index // the index position of its governing archetype

Return

the address for the governing archetype

getGoverningArchetypeData(address,address)

CALL
getGoverningArchetypeData(address,address)

Parameters

_archetype // the archetype address
_governingArchetype // the governing archetype address

Return

the name of the governing archetype

getJurisdictionAtIndexForArchetype(address,uint256)

CALL
getJurisdictionAtIndexForArchetype(address,uint256)

Parameters

_archetype // archetype address
_index // the index of the jurisdiction

Return

the jurisdiction primary key

getJurisdictionDataForArchetype(address,bytes32)

CALL
getJurisdictionDataForArchetype(address,bytes32)

Parameters

_archetype // archetype address
_key // the jurisdiction key

Return

country the jurisdiction's countryregion the jurisdiction's region

getNumberOfArchetypePackages()

CALL
getNumberOfArchetypePackages()

Return

size size

getNumberOfArchetypesInPackage(bytes32)

CALL
getNumberOfArchetypesInPackage(bytes32)

Parameters

_id // id of the package

Return

size archetype count

getNumberOfGoverningArchetypes(address)

CALL
getNumberOfGoverningArchetypes(address)

Parameters

_archetype // address of the archetype

Return

the number of governing archetypes

getNumberOfJurisdictionsForArchetype(address)

CALL
getNumberOfJurisdictionsForArchetype(address)

Parameters

_archetype // archetype address

Return

the number of jurisdictions

getParameterByArchetypeAtIndex(address,uint256)

CALL
getParameterByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getParameterByArchetypeData(address,bytes32)

CALL
getParameterByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

position index of parameterparameterType parameter type

getParametersByArchetypeSize(address)

CALL
getParametersByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Return

always true

migrateTo(address)

CALL
migrateTo(address)

Parameters

_successor // the successor contract to which to migrate the database

Return

true if the database was successfully accepted by the successor, otherwise a REVERT is triggered to rollback the change of system ownership.

minor()

CALL
minor()

packageHasArchetype(bytes32,address)

CALL
packageHasArchetype(bytes32,address)

Parameters

_archetype // address of archetype
_packageId // id of the package

Return

hasArchetype bool representing if archetype is in package

patch()

CALL
patch()

setArchetypePrice(address,uint256)

CALL
setArchetypePrice(address,uint256)

Parameters

_archetype // archetype
_price // price

setArchetypeSuccessor(address,address,address)

CALL
setArchetypeSuccessor(address,address,address)

Parameters

_archetype // address of archetype
_author // address of author (must match the author of the archetype in order to set successor)
_successor // address of successor

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a Versioned contract that replaces this one

Return

true if the upgrade was successful, otherwise a REVERT is triggered to rollback any changes from the upgrade

DefaultEventEmitter

The DefaultEventEmitter contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the specified listener to the specified event.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the specified listener from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

DefaultUserAccount

The DefaultUserAccount contract is found within the agreements bundle.

getId()

Returns this account's ID


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


getId()

CALL
getId()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ERC165 Interface

The ERC165 Interface contract is found within the agreements bundle.

supportsInterface(bytes4)

Interface identification is specified in ERC-165. This function uses less than 30,000 gas.


supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

interfaceID // The interface identifier, as specified in ERC-165

Return

`true` if the contract implements `interfaceID` and
`interfaceID` is not 0xffffffff, `false` otherwise

ERC165Utils

The ERC165Utils contract is found within the agreements bundle.

implementsInterface(address,bytes4)

Detects whether the given contract implements the specified ERC165 interface signature. This is a modified implementation of the example in EIP 881 to avoid the use of the "staticcall" opcode. This function performs two invocations: 1. A "call" to the 0x01ffc9a7 function signature to test if it can be invoked 2. If step 1 returns 'true', the contract is cast to ERC165 and the supportsInterface(bytes4) function is invoked


implementsInterface(address,bytes4)

CALL
implementsInterface(address,bytes4)

Parameters

_contract // the contract to be examined
_interfaceId // the signature of the interface for which to test

Return

true if the contract implements the interface, false otherwise

Ecosystem Interface

The Ecosystem Interface contract is found within the agreements bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Errors Library

The Errors Library contract is found within the agreements bundle.

format(string,string,string)

Format the provided parameters into an error string


revertIf(bool,string,string,string)

Wrapper function around a revert that avoids assembling the error message if the condition is false. This function is meant to replace require(condition, ErrorsLib.format(...)) to avoid the cost of assembling an error string before the condition is checked.


format(string,string,string)

CALL
format(string,string,string)

revertIf(bool,string,string,string)

CALL
revertIf(bool,string,string,string)

EventEmitter Interface

The EventEmitter Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

EventListener

The EventListener contract is found within the agreements bundle.

eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,bytes32,address)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32,address)

CALL
eventFired(bytes32,address,bytes32,address)

Parameters

_event // the event name
_key1 // the payload
_key2 // the payload
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

Mappings API Library

The Mappings API Library contract is found within the agreements bundle.

addToArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


clear(Mappings.AddressAddressArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.AddressAddressMap storage)

Removes all entries stored in the mapping.


clear(Mappings.AddressBoolMap storage)

Removes all entries stored in the mapping.


clear(Mappings.AddressBytes32ArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.AddressBytes32Map storage)

Removes all entries stored in the mapping.


clear(Mappings.Bytes32AddressArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.Bytes32AddressMap storage)

Removes all entries stored in the map.


clear(Mappings.Bytes32Bytes32Map storage)

Removes all entries stored in the map.


clear(Mappings.Bytes32StringMap storage)

Removes all entries stored in the map.


clear(Mappings.Bytes32UintMap storage)

Removes all entries stored in the map.


clear(Mappings.StringAddressMap storage)

Removes all entries stored in the map.


clear(Mappings.UintAddressArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.UintAddressMap storage)

Removes all entries stored in the mapping.


clear(Mappings.UintBytes32ArrayMap storage)

Removes all entries stored in the mapping.


exists(Mappings.AddressAddressArrayMap storage,address)


exists(Mappings.AddressAddressMap storage,address)


exists(Mappings.AddressBoolMap storage,address)


exists(Mappings.AddressBytes32ArrayMap storage,address)


exists(Mappings.AddressBytes32Map storage,address)


exists(Mappings.Bytes32AddressArrayMap storage,bytes32)


exists(Mappings.Bytes32AddressMap storage,bytes32)

Convenience function to return the row[_key].exists value.


exists(Mappings.Bytes32Bytes32Map storage,bytes32)

Convenience function to return the row[_key].exists value.


exists(Mappings.Bytes32StringMap storage,bytes32)

Convenience function to return the row[_key].exists value.


exists(Mappings.Bytes32UintMap storage,bytes32)

Convenience function to return the row[_key].exists value.


exists(Mappings.StringAddressMap storage,string)

Convenience function to return the row[_key].exists value.


exists(Mappings.UintAddressArrayMap storage,uint256)


exists(Mappings.UintAddressMap storage,uint256)


exists(Mappings.UintBytes32ArrayMap storage,uint256)


get(Mappings.AddressAddressArrayMap storage,address)

Retrieves the address array in the map at the specified key.


get(Mappings.AddressAddressMap storage,address)


get(Mappings.AddressBoolMap storage,address)


get(Mappings.AddressBytes32ArrayMap storage,address)

Retrieves the bytes32 array in the map at the specified key.


get(Mappings.AddressBytes32Map storage,address)


get(Mappings.Bytes32AddressArrayMap storage,bytes32)

Retrieves the address array in the map at the specified key.


get(Mappings.Bytes32AddressMap storage,bytes32)


get(Mappings.Bytes32Bytes32Map storage,bytes32)


get(Mappings.Bytes32StringMap storage,bytes32)


get(Mappings.Bytes32UintMap storage,bytes32)


get(Mappings.StringAddressMap storage,string)


get(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the address array in the map at the specified key.


get(Mappings.UintAddressMap storage,uint256)


get(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the address array in the map at the specified key.


insert(Mappings.AddressAddressArrayMap storage,address,address[])

Inserts the given address array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.AddressAddressMap storage,address,address)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.AddressBoolMap storage,address,bool)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

Inserts the given bytes32 array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.AddressBytes32Map storage,address,bytes32)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

Inserts the given address array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32AddressMap storage,bytes32,address)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32StringMap storage,bytes32,string)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32UintMap storage,bytes32,uint256)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.StringAddressMap storage,string,address)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.UintAddressArrayMap storage,uint256,address[])

Inserts the given address array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.UintAddressMap storage,uint256,address)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

Inserts the given bytes32 array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insertOrUpdate(Mappings.AddressAddressArrayMap storage,address,address[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressAddressMap storage,address,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressBoolMap storage,address,bool)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressBytes32Map storage,address,bytes32)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32AddressMap storage,bytes32,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32StringMap storage,bytes32,string)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32UintMap storage,bytes32,uint256)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.StringAddressMap storage,string,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.UintAddressArrayMap storage,uint256,address[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.UintAddressMap storage,uint256,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

Inserts or updates the given address array value at the specified key in the provided map.


keyAtIndex(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.AddressAddressMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.AddressBoolMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.AddressBytes32Map storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32StringMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32UintMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.StringAddressMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.UintAddressMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressBoolMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32StringMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.StringAddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyIndex(Mappings.AddressAddressArrayMap storage,address)

Retrieves the index of the specified key.


keyIndex(Mappings.AddressAddressMap storage,address)


keyIndex(Mappings.AddressBoolMap storage,address)


keyIndex(Mappings.AddressBytes32ArrayMap storage,address)

Retrieves the index of the specified key.


keyIndex(Mappings.AddressBytes32Map storage,address)


keyIndex(Mappings.Bytes32AddressArrayMap storage,bytes32)

Retrieves the index of the specified key.


keyIndex(Mappings.Bytes32AddressMap storage,bytes32)


keyIndex(Mappings.Bytes32Bytes32Map storage,bytes32)


keyIndex(Mappings.Bytes32StringMap storage,bytes32)


keyIndex(Mappings.Bytes32UintMap storage,bytes32)


keyIndex(Mappings.StringAddressMap storage,string)


keyIndex(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the index of the specified key.


keyIndex(Mappings.UintAddressMap storage,uint256)

Retrieves the index of the specified key.


keyIndex(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the index of the specified key.


remove(Mappings.AddressAddressArrayMap storage,address)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.AddressAddressMap storage,address)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.AddressBoolMap storage,address)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.AddressBytes32ArrayMap storage,address)

Removes the bytes32 array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.AddressBytes32Map storage,address)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.Bytes32AddressArrayMap storage,bytes32)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.Bytes32AddressMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.Bytes32Bytes32Map storage,bytes32)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.Bytes32StringMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.Bytes32UintMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.StringAddressMap storage,string)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.UintAddressArrayMap storage,uint256)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.UintAddressMap storage,uint256)

Removes the entry registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.UintBytes32ArrayMap storage,uint256)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


removeFromArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


valueAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.AddressBoolMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32StringMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

Retrieves the value at the given index position and the index of the next value.


valueAtIndexHasNext(Mappings.StringAddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


addToArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

CALL
addToArray(Mappings.AddressAddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

CALL
addToArray(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

CALL
addToArray(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

CALL
addToArray(Mappings.UintAddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

CALL
addToArray(Mappings.UintBytes32ArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

clear(Mappings.AddressAddressArrayMap storage)

CALL
clear(Mappings.AddressAddressArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

clear(Mappings.AddressAddressMap storage)

CALL
clear(Mappings.AddressAddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.AddressBoolMap storage)

CALL
clear(Mappings.AddressBoolMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.AddressBytes32ArrayMap storage)

CALL
clear(Mappings.AddressBytes32ArrayMap

Parameters

_map // the AddressBytes32ArrayMap

Return

the number of removed entries

clear(Mappings.AddressBytes32Map storage)

CALL
clear(Mappings.AddressBytes32Map

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32AddressArrayMap storage)

CALL
clear(Mappings.Bytes32AddressArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

clear(Mappings.Bytes32AddressMap storage)

CALL
clear(Mappings.Bytes32AddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32Bytes32Map storage)

CALL
clear(Mappings.Bytes32Bytes32Map

Parameters

_map // the Bytes32Bytes32Map

Return

the number of removed entries

clear(Mappings.Bytes32StringMap storage)

CALL
clear(Mappings.Bytes32StringMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32UintMap storage)

CALL
clear(Mappings.Bytes32UintMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.StringAddressMap storage)

CALL
clear(Mappings.StringAddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.UintAddressArrayMap storage)

CALL
clear(Mappings.UintAddressArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

clear(Mappings.UintAddressMap storage)

CALL
clear(Mappings.UintAddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.UintBytes32ArrayMap storage)

CALL
clear(Mappings.UintBytes32ArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

exists(Mappings.AddressAddressArrayMap storage,address)

CALL
exists(Mappings.AddressAddressArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressAddressMap storage,address)

CALL
exists(Mappings.AddressAddressMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressBoolMap storage,address)

CALL
exists(Mappings.AddressBoolMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressBytes32ArrayMap storage,address)

CALL
exists(Mappings.AddressBytes32ArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressBytes32Map storage,address)

CALL
exists(Mappings.AddressBytes32Map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
exists(Mappings.Bytes32AddressArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32AddressMap storage,bytes32)

CALL
exists(Mappings.Bytes32AddressMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
exists(Mappings.Bytes32Bytes32Map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32StringMap storage,bytes32)

CALL
exists(Mappings.Bytes32StringMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32UintMap storage,bytes32)

CALL
exists(Mappings.Bytes32UintMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.StringAddressMap storage,string)

CALL
exists(Mappings.StringAddressMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintAddressArrayMap storage,uint256)

CALL
exists(Mappings.UintAddressArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintAddressMap storage,uint256)

CALL
exists(Mappings.UintAddressMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
exists(Mappings.UintBytes32ArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

get(Mappings.AddressAddressArrayMap storage,address)

CALL
get(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty address[] if it doesn't exist

get(Mappings.AddressAddressMap storage,address)

CALL
get(Mappings.AddressAddressMap

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.AddressBoolMap storage,address)

CALL
get(Mappings.AddressBoolMap

Return

the value registered at the specified key, or an empty bool if it doesn't exist

get(Mappings.AddressBytes32ArrayMap storage,address)

CALL
get(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the AddressBytes32ArrayMap

Return

the addresses array value registered at the specified key, or empty bytes32[] if it doesn't exist

get(Mappings.AddressBytes32Map storage,address)

CALL
get(Mappings.AddressBytes32Map

Return

the value registered at the specified key, or an empty bytes32 if it doesn't exist

get(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
get(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty address[] if it doesn't exist

get(Mappings.Bytes32AddressMap storage,bytes32)

CALL
get(Mappings.Bytes32AddressMap

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
get(Mappings.Bytes32Bytes32Map

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.Bytes32StringMap storage,bytes32)

CALL
get(Mappings.Bytes32StringMap

Return

the value registered at the specified key, or an empty string if it doesn't exist

get(Mappings.Bytes32UintMap storage,bytes32)

CALL
get(Mappings.Bytes32UintMap

Return

the value registered at the specified key

get(Mappings.StringAddressMap storage,string)

CALL
get(Mappings.StringAddressMap

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.UintAddressArrayMap storage,uint256)

CALL
get(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty address[] if it doesn't exist

get(Mappings.UintAddressMap storage,uint256)

CALL
get(Mappings.UintAddressMap

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
get(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty bytes32[] if it doesn't exist

insert(Mappings.AddressAddressArrayMap storage,address,address[])

CALL
insert(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.AddressAddressMap storage,address,address)

CALL
insert(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.AddressBoolMap storage,address,bool)

CALL
insert(Mappings.AddressBoolMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

CALL
insert(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.AddressBytes32Map storage,address,bytes32)

CALL
insert(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

CALL
insert(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.Bytes32AddressMap storage,bytes32,address)

CALL
insert(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

CALL
insert(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the Bytes32Bytes32Map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.Bytes32StringMap storage,bytes32,string)

CALL
insert(Mappings.Bytes32StringMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.Bytes32UintMap storage,bytes32,uint256)

CALL
insert(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the Uint Map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.StringAddressMap storage,string,address)

CALL
insert(Mappings.StringAddressMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.UintAddressArrayMap storage,uint256,address[])

CALL
insert(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.UintAddressMap storage,uint256,address)

CALL
insert(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

CALL
insert(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insertOrUpdate(Mappings.AddressAddressArrayMap storage,address,address[])

CALL
insertOrUpdate(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressAddressMap storage,address,address)

CALL
insertOrUpdate(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressBoolMap storage,address,bool)

CALL
insertOrUpdate(Mappings.AddressBoolMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

CALL
insertOrUpdate(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressBytes32Map storage,address,bytes32)

CALL
insertOrUpdate(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

CALL
insertOrUpdate(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32AddressMap storage,bytes32,address)

CALL
insertOrUpdate(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

CALL
insertOrUpdate(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the Bytes32Bytes32Map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32StringMap storage,bytes32,string)

CALL
insertOrUpdate(Mappings.Bytes32StringMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32UintMap storage,bytes32,uint256)

CALL
insertOrUpdate(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the Uint Map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.StringAddressMap storage,string,address)

CALL
insertOrUpdate(Mappings.StringAddressMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintAddressArrayMap storage,uint256,address[])

CALL
insertOrUpdate(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintAddressMap storage,uint256,address)

CALL
insertOrUpdate(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

CALL
insertOrUpdate(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

keyAtIndex(Mappings.AddressAddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.AddressAddressMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0)

keyAtIndex(Mappings.AddressBoolMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressBoolMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0)

keyAtIndex(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the AddressBytes32ArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.AddressBytes32Map storage,uint256)

CALL
keyAtIndex(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0)

keyAtIndex(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.Bytes32AddressMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the Bytes32Bytes32Map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.Bytes32StringMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32StringMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.Bytes32UintMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.StringAddressMap storage,uint256)

CALL
keyAtIndex(Mappings.StringAddressMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.UintAddressMap storage,uint256)

CALL
keyAtIndex(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), uint(-1))

keyAtIndex(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or 0x0nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or 0x0nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.AddressBoolMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressBoolMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or 0x0nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextIndex the next index if there is one or 0

keyAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or 0x0nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the Bytes32Bytes32Map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32StringMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32StringMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.StringAddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.StringAddressMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextindex the next index if there is one or 0

keyIndex(Mappings.AddressAddressArrayMap storage,address)

CALL
keyIndex(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.AddressAddressMap storage,address)

CALL
keyIndex(Mappings.AddressAddressMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.AddressBoolMap storage,address)

CALL
keyIndex(Mappings.AddressBoolMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.AddressBytes32ArrayMap storage,address)

CALL
keyIndex(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the AddressBytes32ArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.AddressBytes32Map storage,address)

CALL
keyIndex(Mappings.AddressBytes32Map

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32AddressMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32AddressMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
keyIndex(Mappings.Bytes32Bytes32Map

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32StringMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32StringMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32UintMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32UintMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.StringAddressMap storage,string)

CALL
keyIndex(Mappings.StringAddressMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyIndex(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.UintAddressMap storage,uint256)

CALL
keyIndex(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyIndex(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

remove(Mappings.AddressAddressArrayMap storage,address)

CALL
remove(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.AddressAddressMap storage,address)

CALL
remove(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.AddressBoolMap storage,address)

CALL
remove(Mappings.AddressBoolMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.AddressBytes32ArrayMap storage,address)

CALL
remove(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.AddressBytes32Map storage,address)

CALL
remove(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
remove(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.Bytes32AddressMap storage,bytes32)

CALL
remove(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the AddressMap

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
remove(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the Bytes32Bytes32Map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.Bytes32StringMap storage,bytes32)

CALL
remove(Mappings.Bytes32StringMap

Parameters

_key // the key
_map // the AddressMap

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.Bytes32UintMap storage,bytes32)

CALL
remove(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the Uint Map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.StringAddressMap storage,string)

CALL
remove(Mappings.StringAddressMap

Parameters

_key // the key
_map // the AddressMap

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.UintAddressArrayMap storage,uint256)

CALL
remove(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.UintAddressMap storage,uint256)

CALL
remove(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
remove(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

removeFromArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

CALL
removeFromArray(Mappings.AddressAddressArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

CALL
removeFromArray(Mappings.AddressBytes32ArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

CALL
removeFromArray(Mappings.Bytes32AddressArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

CALL
removeFromArray(Mappings.UintAddressArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

CALL
removeFromArray(Mappings.UintBytes32ArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

valueAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or address[], and nextIndex

valueAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.AddressBoolMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressBoolMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or bytes32[], and nextIndex

valueAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or address[], and nextIndex

valueAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the Bytes32Bytes32Map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.Bytes32StringMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32StringMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.StringAddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.StringAddressMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or address[], and nextIndex

valueAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or bytes32[], and nextIndex

Migratable

The Migratable contract is found within the agreements bundle.

migrateFrom(address)

Performs the PULL migration of state from the specified predecessor to this contract.


migrateTo(address)

Performs the PUSH migration of state from this contract to the specified contract.


migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

true if the operation succeeded, false otherwise

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

true if the operation succeeded, false otherwise

Named Interface

The Named Interface contract is found within the agreements bundle.

getName()

Returns the name of this contract.


getName()

CALL
getName()

Return

the bytes32 name

NamedElement Interface

The NamedElement Interface contract is found within the agreements bundle.

getId()

Returns the identifier of this contract.


getName()

Returns the name of this contract.


getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

Organization Interface

The Organization Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


addUser(address)

Adds the specified user to this organization as an active user. If the user already exists, the function ensures the account is active.


addUserToDepartment(address,bytes32)

Adds the specified user to the organization if they aren't already registered, then adds the user to the department if they aren't already in it.


authorizeUser(address,bytes32)

Returns whether the given user account is active in this organization and is authorized. The optional department/role identifier can be used to provide an additional authorization scope against which to authorize the user.


getApproverAtIndex(uint256)

Returns the approver's address at the given index position.


getDepartmentUserAtIndex(bytes32,uint256)

Returns the user's address at the given index of the department.


getNumberOfApprovers()

Returns the number of registered approvers.


getNumberOfDepartmentUsers(bytes32)

Returns the number of users in a given department of the organization.


getNumberOfUsers()

returns the number of users associated with this organization


getUserAtIndex(uint256)

Returns the user's address at the given index position.


removeDepartment(bytes32)

Removes the department in this organization.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


removeUser(address)

Removes the user in this organization.


removeUserFromDepartment(address,bytes32)

Removes the user from the department in this organization


supportsInterface(bytes4)

Interface identification is specified in ERC-165. This function uses less than 30,000 gas.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

addUser(address)

CALL
addUser(address)

Parameters

_userAccount // the user to add

Return

bool true if successful

addUserToDepartment(address,bytes32)

CALL
addUserToDepartment(address,bytes32)

Parameters

_department // department id to which the user should be added
_userAccount // the user to add

Return

bool true if successful

authorizeUser(address,bytes32)

CALL
authorizeUser(address,bytes32)

Parameters

_department // an optional department/role context
_userAccount // the user account

Return

true if authorized, false otherwise

getApproverAtIndex(uint256)

CALL
getApproverAtIndex(uint256)

Parameters

_pos // the index position

Return

the address, if the position exists

getDepartmentUserAtIndex(bytes32,uint256)

CALL
getDepartmentUserAtIndex(bytes32,uint256)

Parameters

_depId // the id of the department
_index // the index position

Return

userAccount the address of the user or 0x0 if the position does not exist

getNumberOfApprovers()

CALL
getNumberOfApprovers()

Return

the number of approvers

getNumberOfDepartmentUsers(bytes32)

CALL
getNumberOfDepartmentUsers(bytes32)

Parameters

_depId // the id of the department

Return

size the number of users

getNumberOfUsers()

CALL
getNumberOfUsers()

Return

the number of users

getUserAtIndex(uint256)

CALL
getUserAtIndex(uint256)

Parameters

_pos // the index position

Return

the address or 0x0 if the position does not exist

removeDepartment(bytes32)

CALL
removeDepartment(bytes32)

Parameters

_depId // the department to remove

Return

bool indicating success or failure

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

removeUser(address)

CALL
removeUser(address)

Parameters

_userAccount // the account to remove

Return

bool indicating success or failure

removeUserFromDepartment(address,bytes32)

CALL
removeUserFromDepartment(address,bytes32)

Parameters

_depId // the department to remove the user from
_userAccount // the user to remove

Return

bool indicating success or failure

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

interfaceID // The interface identifier, as specified in ERC-165

Return

`true` if the contract implements `interfaceID` and
`interfaceID` is not 0xffffffff, `false` otherwise

Owned

The Owned contract is found within the agreements bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

OwnerTransferable

The OwnerTransferable contract is found within the agreements bundle.

transferOwnership(address)

Allows to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ParameterTypesAccess

The ParameterTypesAccess contract is found within the agreements bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

ParticipantsManager Interface

The ParticipantsManager Interface contract is found within the agreements bundle.

addOrganization(address)

Adds the organization at the specified address


addUserAccount(address)

Adds the specified UserAccount


createOrganization(address[10])

Creates and adds a new Organization with the specified parameters


createUserAccount(bytes32,address,address)

Creates and adds a user account


eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,bytes32,address)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


getApproverAtIndex(address,uint256)

Returns the approver's address at the given index position of the specified organization.


getApproverData(address,address)

Function supports SQLsol, but only returns the approver address parameter.


getNumberOfApprovers(address)

Returns the number of registered approvers in the specified organization.


getNumberOfOrganizations()

Returns the number of registered organizations.


getNumberOfUsers(address)

returns the number of users associated with the specified organization


getOrganization(address)

Returns the address of the organization with the specified ID, if it exists


getOrganizationAtIndex(uint256)

Returns the organization at the specified index.


getOrganizationData(address)

Returns the public data of the organization at the specified address


getUserAccount(bytes32)

Returns the user account address for the specified user account ID.


getUserAccountDataById(bytes32)

Gets hashed user account ID and user account address for the specified user account ID.


getUserAtIndex(address,uint256)

Returns the user's address at the given index position in the specified organization.


getUserData(address,address)

Returns information about the specified user in the context of the given organization (only address is stored)


organizationExists(address)

Indicates whether the specified organization exists for the given organization id


upgrade(address)

Performs the necessary steps to upgrade from this contract to the specified new version.


userAccountExists(bytes32)

Indicates whether the specified user account exists for the given userAccount ID


addOrganization(address)

CALL
addOrganization(address)

Parameters

_address // the Organization contract's address

Return

error code

addUserAccount(address)

CALL
addUserAccount(address)

Return

an error code

createOrganization(address[10])

CALL
createOrganization(address[10])

Parameters

_approvers // the initial owners.

Return

error code and the address of the newly created organization, if successful

createUserAccount(bytes32,address,address)

CALL
createUserAccount(bytes32,address,address)

Parameters

_ecosystem // owner (optional)
_id // id (required)
_owner // owner (optional)

Return

error code indicating success or failureuserAccount user account

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32,address)

CALL
eventFired(bytes32,address,bytes32,address)

Parameters

_event // the event name
_key1 // the payload
_key2 // the payload
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

getApproverAtIndex(address,uint256)

CALL
getApproverAtIndex(address,uint256)

Parameters

_organization // the organization's address
_pos // the index position

Return

the approver's address, if the position exists

getApproverData(address,address)

CALL
getApproverData(address,address)

Parameters

_approver // the approver's address
_organization // the organization's address

getNumberOfApprovers(address)

CALL
getNumberOfApprovers(address)

Parameters

_organization // the organization's address

Return

the number of approvers

getNumberOfOrganizations()

CALL
getNumberOfOrganizations()

Return

the number of organizations

getNumberOfUsers(address)

CALL
getNumberOfUsers(address)

Parameters

_organization // the organization's address

Return

the number of users

getOrganization(address)

CALL
getOrganization(address)

Parameters

_address // the organization's address

Return

the organization's address, if it exists

getOrganizationAtIndex(uint256)

CALL
getOrganizationAtIndex(uint256)

Parameters

_pos // the index position

Return

the address of the organization

getOrganizationData(address)

CALL
getOrganizationData(address)

Parameters

_organization // the address of an organization

Return

the organization's ID and name

getUserAccount(bytes32)

CALL
getUserAccount(bytes32)

getUserAccountDataById(bytes32)

CALL
getUserAccountDataById(bytes32)

Parameters

_id // the user account ID

Return

error RESOURCE_NOT_FOUND or NO_ERRORaddr user account addresshashedId hashed user account ID

getUserAtIndex(address,uint256)

CALL
getUserAtIndex(address,uint256)

Parameters

_organization // the organization's address
_pos // the index position

Return

the address or 0x0 if the position does not exist

getUserData(address,address)

CALL
getUserData(address,address)

Parameters

_organization // the organization's address
_user // the user's address

Return

userAddress - address of the user

organizationExists(address)

CALL
organizationExists(address)

Parameters

_address // organization address

Return

bool exists

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a contract that replaces this one

Return

true if successful, false otherwise

userAccountExists(bytes32)

CALL
userAccountExists(bytes32)

Parameters

_id // userAccount ID

Return

bool exists

ProcessDefinition Interface

The ProcessDefinition Interface contract is found within the agreements bundle.

addProcessInterfaceImplementation(address,bytes32)

Adds the specified process interface to the list of supported process interfaces of this ProcessDefinition


createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Creates a new activity definition with the specified parameters.


createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Create a data mapping for the specified activity and direction.


createGateway(bytes32,uint8)

Creates a new BpmModel.Gateway model element with the specified ID and type


createTransition(bytes32,bytes32)

Creates a transition between the specified source and target elements.


createTransitionConditionForAddress(bytes32,bytes32,bytes32,bytes32,address,uint8,address)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object.


createTransitionConditionForBool(bytes32,bytes32,bytes32,bytes32,address,uint8,bool)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object.


createTransitionConditionForBytes32(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object.


createTransitionConditionForDataStorage(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32,bytes32,address)

Creates a transition condition between the specified gateway and activity using the given parameters. The "lh..." parameters are used to construct a left-hand side DataStorageUtils.ConditionalData object while the "rh..." ones are used for a right-hand side DataStorageUtils.ConditionalData as comparison


createTransitionConditionForInt(bytes32,bytes32,bytes32,bytes32,address,uint8,int256)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object.


createTransitionConditionForString(bytes32,bytes32,bytes32,bytes32,address,uint8,string)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object.


createTransitionConditionForUint(bytes32,bytes32,bytes32,bytes32,address,uint8,uint256)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object.


getActivitiesForParticipant(bytes32)

Returns the IDs of all activities connected to the given model participant. This function can be used to retrieve all user tasks belonging to the same "swimlane" in the model.


getActivityAtIndex(uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition


getActivityData(bytes32)

Returns information about the activity definition with the given ID.


getActivityGraphDetails(bytes32)

Returns connectivity details about the specified activity.


getElementType(bytes32)

Returns the ModelElementType for the element with the specified ID.


getGatewayGraphDetails(bytes32)

Returns connectivity details about the specified gateway.


getId()

Returns the identifier of this contract.


getImplementedProcessInterfaceAtIndex(uint256)

Returns information about the process interface at the given index


getInDataMappingDetails(bytes32,bytes32)

Returns information about the IN data mapping of the specified activity with the given ID.


getInDataMappingIdAtIndex(bytes32,uint256)

Returns the ID of the IN data mapping of the specified activity at the specified index.


getInDataMappingKeys(bytes32)

Returns an array of the IN data mapping ids of the specified activity.


getModel()

Returns the ProcessModel which contains this process definition


getModelId()

Returns the ID of the model which contains this process definition


getNumberOfActivities()

Returns the number of activity definitions in this ProcessDefinition.


getNumberOfImplementedProcessInterfaces()

Returns the number of implemented process interfaces implemented by this ProcessDefinition


getNumberOfInDataMappings(bytes32)

Returns the number of IN data mappings for the specified activity.


getNumberOfOutDataMappings(bytes32)

Returns the number of OUT data mappings for the specified activity.


getOutDataMappingDetails(bytes32,bytes32)

Returns information about the OUT data mapping of the specified activity with the given ID.


getOutDataMappingIdAtIndex(bytes32,uint256)

Returns the ID of the OUT data mapping of the specified activity at the specified index.


getOutDataMappingKeys(bytes32)

Returns an array of the OUT data mapping ids of the specified activity.


getStartActivity()

Returns the ID of the start activity of this process definition. If the process is valid, this value must be set.


implementsProcessInterface(address,bytes32)

indicates whether this ProcessDefinition implements the specified interface


isValid()

Returns the current validity state


modelElementExists(bytes32)

Returns whether the given ID belongs to a model element (gateway or activity) known in this ProcessDefinition.


resolveTransitionCondition(bytes32,bytes32,address)

Resolves a transition condition between the given source and target model elements using the provided DataStorage to lookup data. The function should return 'true' as default if no condition exists for the specified transition.


setDefaultTransition(bytes32,bytes32)

Sets the specified activity to be the default output (default transition) of the specified gateway.


validate()

Validates the coherence of the process definition in terms of the diagram and its configuration and sets the valid flag.


addProcessInterfaceImplementation(address,bytes32)

CALL
addProcessInterfaceImplementation(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

an error code signaling success or failure

createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

CALL
createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Parameters

_activityType // the BpmModel.ActivityType [TASK|SUBPROCESS]
_application // the application handling the execution of the activity
_assignee // the ID of the participant performing the activity (for USER tasks only)
_behavior // the BpmModel.TaskBehavior [SEND|SENDRECEIVE|RECEIVE]
_id // the activity ID
_multiInstance // whether the activity represents multiple instances
_subProcessDefinitionId // references a subprocess definition (only for SUBPROCESS ActivityType)
_subProcessModelId // references the model containg a subprocess definition (only for SUBPROCESS ActivityType)
_taskType // the BpmModel.TaskType [NONE|USER|SERVICE|EVENT]

Return

an error code indicating success or failure

createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

CALL
createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Parameters

_accessPath // the access path offered by the application. If the application does not have any access paths, this field is used as an ID for the mapping.
_activityId // the ID of the activity in this ProcessDefinition
_dataPath // a data path (key) to use for data lookup on a DataStorage.
_dataStorage // an optional address of a DataStorage as basis for the data path other than the default one
_dataStorageId // an optional key to identify a DataStorage as basis for the data path other than the default one
_direction // the BpmModel.Direction [IN|OUT]

createGateway(bytes32,uint8)

CALL
createGateway(bytes32,uint8)

Parameters

_id // the ID under which to register the element
_type // a BpmModel.GatewayType

createTransition(bytes32,bytes32)

CALL
createTransition(bytes32,bytes32)

Parameters

_source // the start of the transition
_target // the end of the transition

Return

an error code indicating success or failure

createTransitionConditionForAddress(bytes32,bytes32,bytes32,bytes32,address,uint8,address)

CALL
createTransitionConditionForAddress(bytes32,bytes32,bytes32,bytes32,address,uint8,address)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side comparison value

createTransitionConditionForBool(bytes32,bytes32,bytes32,bytes32,address,uint8,bool)

CALL
createTransitionConditionForBool(bytes32,bytes32,bytes32,bytes32,address,uint8,bool)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side comparison value

createTransitionConditionForBytes32(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32)

CALL
createTransitionConditionForBytes32(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side comparison value

createTransitionConditionForDataStorage(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32,bytes32,address)

CALL
createTransitionConditionForDataStorage(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32,bytes32,address)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_gatewayId // the ID of a gateway in this ProcessDefinition
_lhDataPath // the left-hand side dataPath condition
_lhDataStorage // the left-hand side dataStorage condition
_lhDataStorageId // the left-hand side dataStorageId condition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_rhDataPath // the right-hand side dataPath condition
_rhDataStorage // the right-hand side dataStorage condition
_rhDataStorageId // the right-hand side dataStorageId condition

createTransitionConditionForInt(bytes32,bytes32,bytes32,bytes32,address,uint8,int256)

CALL
createTransitionConditionForInt(bytes32,bytes32,bytes32,bytes32,address,uint8,int256)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side comparison value

createTransitionConditionForString(bytes32,bytes32,bytes32,bytes32,address,uint8,string)

CALL
createTransitionConditionForString(bytes32,bytes32,bytes32,bytes32,address,uint8,string)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side comparison value

createTransitionConditionForUint(bytes32,bytes32,bytes32,bytes32,address,uint8,uint256)

CALL
createTransitionConditionForUint(bytes32,bytes32,bytes32,bytes32,address,uint8,uint256)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side comparison value

getActivitiesForParticipant(bytes32)

CALL
getActivitiesForParticipant(bytes32)

Parameters

_participantId // the ID of a participant in the model

Return

an array of activity IDs

getActivityAtIndex(uint256)

CALL
getActivityAtIndex(uint256)

Parameters

_index // the index position

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(bytes32)

CALL
getActivityData(bytes32)

Parameters

_id // the bytes32 id of the activity definition

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getActivityGraphDetails(bytes32)

CALL
getActivityGraphDetails(bytes32)

Parameters

_id // the ID of an activity

Return

predecessor - the ID of its predecessor model elementsuccessor - the ID of its successor model element

getElementType(bytes32)

CALL
getElementType(bytes32)

Parameters

_id // the ID of a model element

Return

the BpmModel.ModelElementType

getGatewayGraphDetails(bytes32)

CALL
getGatewayGraphDetails(bytes32)

Parameters

_id // the ID of a gateway

Return

inputs - the IDs of model elements that are inputs to this gatewayoutputs - the IDs of model elements that are outputs of this gatewaygatewayType - the BpmModel.GatewayTypedefaultOutput - the default output connection (applies only to XOR|OR type gateways)

getId()

CALL
getId()

Return

the bytes32 ID

getImplementedProcessInterfaceAtIndex(uint256)

CALL
getImplementedProcessInterfaceAtIndex(uint256)

Parameters

_idx // the index position

Return

modelAddress the interface's modelinterfaceId the interface ID

getInDataMappingDetails(bytes32,bytes32)

CALL
getInDataMappingDetails(bytes32,bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_id // the data mapping ID

Return

dataMappingId the id of the data mappingaccessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getInDataMappingIdAtIndex(bytes32,uint256)

CALL
getInDataMappingIdAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

the mapping ID, if it exists

getInDataMappingKeys(bytes32)

CALL
getInDataMappingKeys(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the data mapping ids

getModel()

CALL
getModel()

Return

the ProcessModel reference

getModelId()

CALL
getModelId()

Return

the model ID

getNumberOfActivities()

CALL
getNumberOfActivities()

Return

the number of activity definitions

getNumberOfImplementedProcessInterfaces()

CALL
getNumberOfImplementedProcessInterfaces()

Return

the number of process interfaces

getNumberOfInDataMappings(bytes32)

CALL
getNumberOfInDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of IN data mappings

getNumberOfOutDataMappings(bytes32)

CALL
getNumberOfOutDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of OUT data mappings

getOutDataMappingDetails(bytes32,bytes32)

CALL
getOutDataMappingDetails(bytes32,bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_id // the data mapping ID

Return

dataMappingId the id of the data mappingaccessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getOutDataMappingIdAtIndex(bytes32,uint256)

CALL
getOutDataMappingIdAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

the mapping ID, if it exists

getOutDataMappingKeys(bytes32)

CALL
getOutDataMappingKeys(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the data mapping ids

getStartActivity()

CALL
getStartActivity()

Return

the ID of the identified start activity

implementsProcessInterface(address,bytes32)

CALL
implementsProcessInterface(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

true if the interface is supported, false otherwise

isValid()

CALL
isValid()

Return

true if valid, false otherwise

modelElementExists(bytes32)

CALL
modelElementExists(bytes32)

Parameters

_id // the ID of a model element

Return

true if it exists, false otherwise

resolveTransitionCondition(bytes32,bytes32,address)

CALL
resolveTransitionCondition(bytes32,bytes32,address)

Parameters

_dataStorage // the address of a DataStorage.
_sourceId // the ID of a model element in this ProcessDefinition, e.g. a gateway
_targetId // the ID of a model element in this ProcessDefinition, e.g. an activity

Return

true if the condition evaluated to 'true' or if no condition exists, false otherwise

setDefaultTransition(bytes32,bytes32)

CALL
setDefaultTransition(bytes32,bytes32)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_gatewayId // the ID of a gateway in this ProcessDefinition

validate()

CALL
validate()

Return

valid - boolean indicating validityerrorMessage - empty string if valid, otherwise contains a hint what failed

ProcessInstance Interface

The ProcessInstance Interface contract is found within the agreements bundle.

abort(address)

Aborts this ProcessInstance and halts any ongoing activities. After the abort the ProcessInstance cannot be resurrected.


addProcessStateChangeListener(address)

Adds a ProcessStateChangeListener to listeners collection


completeActivity(bytes32,address)

Completes the specified activity


execute(address)

Initiates execution of this ProcessInstance consisting of attempting to activate and process any activities and advance the state of the runtime graph.


getActivityInstanceAtIndex(uint256)

Returns the globally unique ID of the activity instance at the specified index in the ProcessInstance.


getActivityInstanceData(bytes32)

Returns information about the activity instance with the specified ID


getAddressScopeDetails(address,bytes32)

Returns details about the configuration of the address scope.


getAddressScopeDetailsForKey(bytes32)

Returns details about the configuration of the address scope.


getAddressScopeKeys()

Returns the list of keys identifying the address/context scopes.


getDataIdAtIndex(uint256)

Returns the data id at the given index


getDataType(bytes32)

Returns the data type of the Data object identified by the given id


getDataValueAsAddress(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsAddressArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBool(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsIntArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsString(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUintArray(bytes32)

Gets the value of the Data object identified by the given id


getNumberOfActivityInstances()

Returns the number of activity instances currently contained in this ProcessInstance. Note that this number is subject to change as long as the process isntance is not completed.


getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getProcessDefinition()

Returns the process definition on which this instance is based.


getSize()

Returns the size of the DataMap


getStartedBy()

Returns the account that started this process instance


getState()

Returns the state of this process instance


initRuntime()

Initiates and populates the runtime graph that will handle the state of this ProcessInstance.


notifyProcessStateChange()

Notifies listeners about a process state change


removeData(bytes32)

Removes the Data identified by the id from the DataMap, if it exists.


resolveAddressScope(address,bytes32,address)

Returns the scope for the given address and context. If the scope depends on a ConditionalData, the function should attempt to resolve it and return the result.


resolveInDataLocation(bytes32,bytes32)

Resolves the target storage location for the specified IN data mapping in the context of the given activity instance.


resolveOutDataLocation(bytes32,bytes32)

Resolves the target storage location for the specified OUT data mapping in the context of the given activity instance.


setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Associates the given address with a scope qualifier for a given context. The context can be used to bind the same address to different scenarios and different scopes. The scope can either be represented by a fixed bytes32 value of by a ConditionalData that resolves to a bytes32 field.


setDataValueAsAddress(bytes32,address)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsAddressArray(bytes32,address[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBool(bytes32,bool)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32(bytes32,bytes32)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32Array(bytes32,bytes32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt(bytes32,int256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsIntArray(bytes32,int256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsString(bytes32,string)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint(bytes32,uint256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUintArray(bytes32,uint256[100])

Creates a Data object with the given value and inserts it into the DataMap


transferOwnership(address)

Allows to transfer control of the contract to a new owner.


abort(address)

CALL
abort(address)

Parameters

_service // the BpmService to emit update events for ActivityInstances

addProcessStateChangeListener(address)

CALL
addProcessStateChangeListener(address)

Parameters

_listener // the ProcessStateChangeListener to add

completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the activity instance
_service // the BpmService managing this ProcessInstance (required for changes to this ProcessInstance after the activity completes)

Return

an error code indicating success or failure

execute(address)

CALL
execute(address)

Parameters

_service // the BpmService managing this ProcessInstance (required for changes to this ProcessInstance and access to the BpmServiceDb)

Return

error code indicating success or failure

getActivityInstanceAtIndex(uint256)

CALL
getActivityInstanceAtIndex(uint256)

Parameters

_idx // the index position

Return

the bytes32 ID

getActivityInstanceData(bytes32)

CALL
getActivityInstanceData(bytes32)

Parameters

_id // the global ID of the activity instance

Return

activityId - the ID of the activity as defined by the process definitioncreated - the creation timestampcompleted - the completion timestampperformer - the account who is performing the activity (for interactive activities only)completedBy - the account who completed the activity (for interactive activities only) state - the uint8 representation of the BpmRuntime.ActivityInstanceState of this activity instance

getAddressScopeDetails(address,bytes32)

CALL
getAddressScopeDetails(address,bytes32)

Parameters

_address // an address
_context // a context declaration binding the address to a scope

Return

fixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeDetailsForKey(bytes32)

CALL
getAddressScopeDetailsForKey(bytes32)

Parameters

_key // a scope key

Return

keyAddress - the address encoded in the keykeyContext - the context encoded in the keyfixedScope - a bytes32 representing a fixed scopedataPath - the dataPath of a ConditionalData defining the scopedataStorageId - the dataStorageId of a ConditionalData defining the scopedataStorage - the dataStorgage address of a ConditionalData defining the scope

getAddressScopeKeys()

CALL
getAddressScopeKeys()

Return

the bytes32 scope keys

getDataIdAtIndex(uint256)

CALL
getDataIdAtIndex(uint256)

Parameters

_index // the index of the data

Return

error uint error code id bytes32 id of the data

getDataType(bytes32)

CALL
getDataType(bytes32)

Parameters

_id // the id of the data

Return

uint8 the DataType

getDataValueAsAddress(bytes32)

CALL
getDataValueAsAddress(bytes32)

Parameters

_id // the id of the data

Return

address the value of the data

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the id of the data

Return

address[100] the value of the data

getDataValueAsBool(bytes32)

CALL
getDataValueAsBool(bytes32)

Parameters

_id // the id of the data

Return

bool the bool value of the data

getDataValueAsBytes32(bytes32)

CALL
getDataValueAsBytes32(bytes32)

Parameters

_id // the id of the data

Return

bytes32 the value of the data

getDataValueAsBytes32Array(bytes32)

CALL
getDataValueAsBytes32Array(bytes32)

Parameters

_id // the id of the data

Return

bytes32[100] the value of the data

getDataValueAsInt(bytes32)

CALL
getDataValueAsInt(bytes32)

Parameters

_id // the id of the data

Return

int the value of the data

getDataValueAsIntArray(bytes32)

CALL
getDataValueAsIntArray(bytes32)

Parameters

_id // the id of the data

Return

int256[100] the value of the data

getDataValueAsString(bytes32)

CALL
getDataValueAsString(bytes32)

Parameters

_id // the id of the data

Return

string the value of the data

getDataValueAsUint(bytes32)

CALL
getDataValueAsUint(bytes32)

Parameters

_id // the id of the data

Return

uint the value of the data

getDataValueAsUintArray(bytes32)

CALL
getDataValueAsUintArray(bytes32)

Parameters

_id // the id of the data

Return

uint256[100] the value of the data

getNumberOfActivityInstances()

CALL
getNumberOfActivityInstances()

Return

the number of activity instances

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_key // the key for the array-type value

Return

the number of non-default entries in the array

getProcessDefinition()

CALL
getProcessDefinition()

Return

the address of a ProcessDefinition

getSize()

CALL
getSize()

Return

uint the size

getStartedBy()

CALL
getStartedBy()

Return

the address registered when creating the process instance

getState()

CALL
getState()

Return

the uint representation of the BpmRuntime.ProcessInstanceState

initRuntime()

CALL
initRuntime()

notifyProcessStateChange()

CALL
notifyProcessStateChange()

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

resolveAddressScope(address,bytes32,address)

CALL
resolveAddressScope(address,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataStorage // a DataStorage contract to use as a basis if the scope is defined by a ConditionalData

Return

the scope qualifier or an empty bytes32, if no qualifier is set or cannot be determined

resolveInDataLocation(bytes32,bytes32)

CALL
resolveInDataLocation(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance
_dataMappingId // the ID of a data mapping defined for the activity

Return

dataStorage - the address of a DataStoragedataPath - the dataPath under which to find data mapping value

resolveOutDataLocation(bytes32,bytes32)

CALL
resolveOutDataLocation(bytes32,bytes32)

Parameters

_activityInstanceId // the ID of an activity instance
_dataMappingId // the ID of a data mapping defined for the activity

Return

dataStorage - the address of a DataStoragedataPath - the dataPath under which to find data mapping value

setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

CALL
setAddressScope(address,bytes32,bytes32,bytes32,bytes32,address)

Parameters

_address // an address
_context // a context declaration binding the address to a scope
_dataPath // the dataPath of a ConditionalData defining the scope
_dataStorage // the dataStorgage address of a ConditionalData defining the scope
_dataStorageId // the dataStorageId of a ConditionalData defining the scope
_fixedScope // a bytes32 representing a fixed scope

setDataValueAsAddress(bytes32,address)

CALL
setDataValueAsAddress(bytes32,address)

Parameters

_id // the id of the data
_value // the address value of the data

setDataValueAsAddressArray(bytes32,address[100])

CALL
setDataValueAsAddressArray(bytes32,address[100])

Parameters

_id // the id of the data
_value // the address[100] value of the data

setDataValueAsBool(bytes32,bool)

CALL
setDataValueAsBool(bytes32,bool)

Parameters

_id // the id of the data
_value // the bool value of the data

setDataValueAsBytes32(bytes32,bytes32)

CALL
setDataValueAsBytes32(bytes32,bytes32)

Parameters

_id // the id of the data
_value // the bytes32 value of the data

setDataValueAsBytes32Array(bytes32,bytes32[100])

CALL
setDataValueAsBytes32Array(bytes32,bytes32[100])

Parameters

_id // the id of the data
_value // the bytes32[100] value of the data

setDataValueAsInt(bytes32,int256)

CALL
setDataValueAsInt(bytes32,int256)

Parameters

_id // the id of the data
_value // the int value of the data

setDataValueAsIntArray(bytes32,int256[100])

CALL
setDataValueAsIntArray(bytes32,int256[100])

Parameters

_id // the id of the data
_value // the int256[100] value of the data

setDataValueAsString(bytes32,string)

CALL
setDataValueAsString(bytes32,string)

Parameters

_id // the id of the data
_value // the string value of the data

setDataValueAsUint(bytes32,uint256)

CALL
setDataValueAsUint(bytes32,uint256)

Parameters

_id // the id of the data
_value // the uint value of the data

setDataValueAsUintArray(bytes32,uint256[100])

CALL
setDataValueAsUintArray(bytes32,uint256[100])

Parameters

_id // the id of the data
_value // the uint[100] value of the data

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ProcessModel Interface

The ProcessModel Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


addParticipant(bytes32,address,bytes32,bytes32,address)

Adds a participant with the specified ID and attributes to this ProcessModel


addProcessInterface(bytes32)

Adds a process interface declaration to this ProcessModel that process definitions can refer to


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createProcessDefinition(bytes32)

Creates a new process definition with the given parameters in this ProcessModel


fireActivityDefinitionUpdateEvent(bytes32)

To be called by a registered process definition to signal an update.


fireProcessDefinitionUpdateEvent()

To be called by a registered process definition to signal an update.


getAuthor()

Returns model author address


getConditionalParticipant(bytes32,bytes32,address)

Returns the participant ID in this model that matches the given ConditionalData parameters.


getDiagram()

Returns the HOARD file information of the model's diagram


getId()

Returns the ID of this contract.


getName()

Returns the name of this contract.


getNumberOfParticipants()

Returns the number of participants defined in this ProcessModel


getNumberOfProcessDefinitions()

Returns the number of process definitions in this ProcessModel


getNumberOfProcessInterfaces()

Returns the number of process interfaces declared in this ProcessModel


getParticipantAtIndex(uint256)

Returns the ID of the participant at the given index


getParticipantData(bytes32)

Returns information about the participant with the given ID


getProcessDefinition(bytes32)

Returns the address of the ProcessDefinition with the specified ID


getProcessDefinitionAtIndex(uint256)

Returns the address for the ProcessDefinition at the given index


getProcessDefinitionData(address)

Returns information about the ProcessDefinition at the given address


getVersion()

Returns the version as 3-digit array


hasParticipant(bytes32)

Returns whether a participant with the specified ID exists in this ProcessModel


hasProcessInterface(bytes32)

Returns whether a process interface with the specified ID exists in this ProcessModel


isPrivate()

Returns whether the model is private


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

addParticipant(bytes32,address,bytes32,bytes32,address)

CALL
addParticipant(bytes32,address,bytes32,bytes32,address)

Parameters

_account // the address of a participant account
_dataPath // the field key under which to locate the conditional participant
_dataStorage // the address of a DataStorage contract to find a conditional participant
_dataStorageId // a field key in a known DataStorage containing an address of another DataStorage contract
_id // the participant ID

Return

an error code indicating success or failure

addProcessInterface(bytes32)

CALL
addProcessInterface(bytes32)

Parameters

_interfaceId // the ID of the interface

Return

an error code indicating success of failure

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createProcessDefinition(bytes32)

CALL
createProcessDefinition(bytes32)

Parameters

_id // the process ID

Return

an error code indicating success or failurethe address of the new ProcessDefinition when successful

fireActivityDefinitionUpdateEvent(bytes32)

CALL
fireActivityDefinitionUpdateEvent(bytes32)

fireProcessDefinitionUpdateEvent()

CALL
fireProcessDefinitionUpdateEvent()

getAuthor()

CALL
getAuthor()

Return

address - model author

getConditionalParticipant(bytes32,bytes32,address)

CALL
getConditionalParticipant(bytes32,bytes32,address)

Parameters

_dataPath // a data path
_dataStorage // the address of a DataStorage
_dataStorageId // the path to a DataStorage

Return

the ID of a participant or an empty bytes32, if no matching participant exists

getDiagram()

CALL
getDiagram()

Return

location - the HOARD addresssecret - the HOARD secret

getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfParticipants()

CALL
getNumberOfParticipants()

Return

the number of participants

getNumberOfProcessDefinitions()

CALL
getNumberOfProcessDefinitions()

Return

the number of process definitions

getNumberOfProcessInterfaces()

CALL
getNumberOfProcessInterfaces()

Return

the number of process interfaces

getParticipantAtIndex(uint256)

CALL
getParticipantAtIndex(uint256)

Parameters

_idx // the index position

Return

the participant ID, if it exists

getParticipantData(bytes32)

CALL
getParticipantData(bytes32)

Parameters

_id // the participant ID

Return

location the applications contract address, only available for a service participantmethod the function signature of the participant, only available for a service participantwebForm the form identifier (formHash) of the web participant, only available for a web participant

getProcessDefinition(bytes32)

CALL
getProcessDefinition(bytes32)

Parameters

_id // the process ID

Return

the address of the process definition, if it exists

getProcessDefinitionAtIndex(uint256)

CALL
getProcessDefinitionAtIndex(uint256)

Parameters

_idx // the index position

Return

the address of the ProcessDefinition, if it exists

getProcessDefinitionData(address)

CALL
getProcessDefinitionData(address)

Parameters

_processDefinition // the address

Return

id the process IDinterfaceId the first process interface the process definition supportsmodelId the id of the model to which this process definition belongs

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

hasParticipant(bytes32)

CALL
hasParticipant(bytes32)

Parameters

_id // the participant ID

Return

true if it exists, false otherwise

hasProcessInterface(bytes32)

CALL
hasProcessInterface(bytes32)

Parameters

_interfaceId // the interface ID

Return

true if it exists, false otherwise

isPrivate()

CALL
isPrivate()

Return

bool - if model is private

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

ProcessModelRepository Interface

The ProcessModelRepository Interface contract is found within the agreements bundle.

activateModel(address)

Activates the given ProcessModel and deactivates any previously activated model version of the same ID


addModel(address)

Adds the given ProcessModel to this repository.


createProcessModel(bytes32,bytes32,uint8[3],address,bool,bytes32,bytes32)

Factory function to instantiate a ProcessModel. The model is automatically added to this repository.


eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,bytes32,address)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


getActivityAtIndex(address,address,uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition


getActivityData(address,address,bytes32)

Returns information about the activity definition with the given ID.


getModel(bytes32)

Returns the address of the activated model with the given ID, if it exists and is activated


getModelAtIndex(uint256)

Returns the address of the ProcessModel at the given index position, if it exists


getModelByVersion(bytes32,uint8[3])

Returns the address of the model with the given ID and version


getModelData(address)

Returns information about the ProcessModel at the given address


getNumberOfActivities(address,address)

Returns the number of Activity Definitions in the specified Process


getNumberOfModels()

Returns the number of models in this repository.


getNumberOfProcessDefinitions(address)

Returns the number of process definitions in the specified model


getProcessDefinition(bytes32,bytes32)

Returns the process definition address when the model ID and process definition ID are provided


getProcessDefinitionAtIndex(address,uint256)

Returns the address of the ProcessDefinition at the specified index position of the given model


getProcessDefinitionData(address,address)

Returns data about the specified ProcessDefinition in the specified ProcessModel


upgrade(address)

Performs the necessary steps to upgrade from this contract to the specified new version.


activateModel(address)

CALL
activateModel(address)

Parameters

_model // the ProcessModel to activate

Return

an error indicating success or failure

addModel(address)

CALL
addModel(address)

Parameters

_model // the ProcessModel to add

Return

an error indicating success or failure

createProcessModel(bytes32,bytes32,uint8[3],address,bool,bytes32,bytes32)

CALL
createProcessModel(bytes32,bytes32,uint8[3],address,bool,bytes32,bytes32)

Parameters

_author // the model author
_hoardAddress // the HOARD address of the model file
_hoardSecret // the HOARD secret of the model file
_id // the model ID
_isPrivate // indicates if the model is private
_name // the model name
_version // the model version

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32,address)

CALL
eventFired(bytes32,address,bytes32,address)

Parameters

_event // the event name
_key1 // the payload
_key2 // the payload
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

getActivityAtIndex(address,address,uint256)

CALL
getActivityAtIndex(address,address,uint256)

Parameters

_index // the index position
_model // the model address
_processDefinition // a Process Definition address

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(address,address,bytes32)

CALL
getActivityData(address,address,bytes32)

Parameters

_id // the bytes32 id of the activity definition
_model // the model address
_processDefinition // a Process Definition address

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getModel(bytes32)

CALL
getModel(bytes32)

Parameters

_id // the model ID

Return

the model address, if found

getModelAtIndex(uint256)

CALL
getModelAtIndex(uint256)

Parameters

_idx // the index position

Return

the model address

getModelByVersion(bytes32,uint8[3])

CALL
getModelByVersion(bytes32,uint8[3])

Parameters

_id // the model ID
_version // the model version

Return

the model address, if found

getModelData(address)

CALL
getModelData(address)

Parameters

_model // the ProcessModel address

Return

id - the model IDname - the model nameversionMajor - the model's major versionversionMinor - the model's minor versionversionPatch - the model's patch versionauthor - the model's authorisPrivate - indicates if model is privateactive - whether the model is activediagramAddress - the HOARD address of the model diagram filediagramSecret - the HOARD secret of the model diagram file

getNumberOfActivities(address,address)

CALL
getNumberOfActivities(address,address)

Parameters

_model // the model address
_processDefinition // a Process Definition address

Return

uint - the number of Activity Definitions

getNumberOfModels()

CALL
getNumberOfModels()

Return

size - the number of models

getNumberOfProcessDefinitions(address)

CALL
getNumberOfProcessDefinitions(address)

Parameters

_model // a ProcessModel address

Return

size - the number of process definitions

getProcessDefinition(bytes32,bytes32)

CALL
getProcessDefinition(bytes32,bytes32)

Parameters

_modelId // - the ProcessModel ID

Return

_processId - the ProcessDefinition IDaddress - the ProcessDefinition address

getProcessDefinitionAtIndex(address,uint256)

CALL
getProcessDefinitionAtIndex(address,uint256)

Parameters

_idx // the index position
_model // a ProcessModel address

Return

the ProcessDefinition address, if it exists

getProcessDefinitionData(address,address)

CALL
getProcessDefinitionData(address,address)

Parameters

_model // a ProcessModel address
_processDefinition // a ProcessDefinition address

Return

id - the ProcessDefinition IDinterfaceId - the ProcessDefinition's first interface IDmodelId the id of the model to which this process definition belongs

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a contract that replaces this one

Return

true if successful, false otherwise

ProcessStateChangeEmitter

The ProcessStateChangeEmitter contract is found within the agreements bundle.

addProcessStateChangeListener(address)

Adds a ProcessStateChangeListener to listeners collection


notifyProcessStateChange()

Notifies listeners about a process state change


addProcessStateChangeListener(address)

CALL
addProcessStateChangeListener(address)

Parameters

_listener // the ProcessStateChangeListener to add

notifyProcessStateChange()

CALL
notifyProcessStateChange()

ProcessStateChangeListener

The ProcessStateChangeListener contract is found within the agreements bundle.

processStateChanged(address)

Invoked by a ProcessStateChangeEventEmitter to notify of process state change


processStateChanged(address)

CALL
processStateChanged(address)

Parameters

_pi // the process instance whose state changed

Signable

The Signable contract is found within the agreements bundle.

sign()

Applies a signature to a signable entity. The implementing contract has the msg.sender, or the tx.origin at its disposal to use as signature. This function is therefore intended to be called directly from the account that is attempting to sign.


sign()

CALL
sign()

SystemOwned

The SystemOwned contract is found within the agreements bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

SystemOwnerTransferable

The SystemOwnerTransferable contract is found within the agreements bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

TypeUtils Library Interface

The TypeUtils Library Interface contract is found within the agreements bundle.

contentLength(bytes32)

Returns the length of the alphanumeric content of the bytes32, i.e. the number of non-empty bytes


isEmpty(bytes32)

Checks if the given bytes32 is empty.


toBytes32(string)

Converts the given string to bytes32. If the string is longer than 32 byte-sized characters (depends on encoding and character-set), it will be truncated.


toBytes32(uint256)

Converts an unsigned integer to its string representation.


contentLength(bytes32)

CALL
contentLength(bytes32)

Parameters

self // bytes32

Return

the length

isEmpty(bytes32)

CALL
isEmpty(bytes32)

Parameters

_value // the value to check

Return

true if empty, false otherwise

toBytes32(string)

CALL
toBytes32(string)

Parameters

s // a string

Return

the bytes32 representation

toBytes32(uint256)

CALL
toBytes32(uint256)

Parameters

v // The number to be converted.

Return

the bytes32 representation

UpgradeOwned

The UpgradeOwned contract is found within the agreements bundle.

transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

UpgradeOwnerTransferable

The UpgradeOwnerTransferable contract is found within the agreements bundle.

transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Upgradeable

The Upgradeable contract is found within the agreements bundle.

upgrade(address)

Performs the necessary steps to upgrade from this contract to the specified new version.


upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a contract that replaces this one

Return

true if successful, false otherwise

UserAccount Interface

The UserAccount Interface contract is found within the agreements bundle.

getId()

Returns the identifier of this contract.


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


getId()

CALL
getId()

Return

the bytes32 ID

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Versioned

The Versioned contract is found within the agreements bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

WorkflowProxy

The WorkflowProxy contract is found within the agreements bundle.

completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


completeActivityWithAddressData(bytes32,address,bytes32,address)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBoolData(bytes32,address,bytes32,bool)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Writes data via BpmService and then completes the specified activity.


completeActivityWithIntData(bytes32,address,bytes32,int256)

Writes data via BpmService and then completes the specified activity.


completeActivityWithStringData(bytes32,address,bytes32,string)

Writes data via BpmService and then completes the specified activity.


completeActivityWithUintData(bytes32,address,bytes32,uint256)

Writes data via BpmService and then completes the specified activity.


completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

completeActivityWithAddressData(bytes32,address,bytes32,address)

CALL
completeActivityWithAddressData(bytes32,address,bytes32,address)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the address value of the data

Return

error code if the completion failed

completeActivityWithBoolData(bytes32,address,bytes32,bool)

CALL
completeActivityWithBoolData(bytes32,address,bytes32,bool)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bool value of the data

Return

error code if the completion failed

completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

CALL
completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bytes32 value of the data

Return

error code if the completion failed

completeActivityWithIntData(bytes32,address,bytes32,int256)

CALL
completeActivityWithIntData(bytes32,address,bytes32,int256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the int value of the data

Return

error code if the completion failed

completeActivityWithStringData(bytes32,address,bytes32,string)

CALL
completeActivityWithStringData(bytes32,address,bytes32,string)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the string value of the data

Return

error code if the completion failed

completeActivityWithUintData(bytes32,address,bytes32,uint256)

CALL
completeActivityWithUintData(bytes32,address,bytes32,uint256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the uint value of the data

Return

error code if the completion failed

WorkflowUserAccount

The WorkflowUserAccount contract is found within the agreements bundle.

completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


completeActivityWithAddressData(bytes32,address,bytes32,address)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBoolData(bytes32,address,bytes32,bool)

Writes data via BpmService and then completes the specified activity.


completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Writes data via BpmService and then completes the specified activity.


completeActivityWithIntData(bytes32,address,bytes32,int256)

Writes data via BpmService and then completes the specified activity.


completeActivityWithStringData(bytes32,address,bytes32,string)

Writes data via BpmService and then completes the specified activity.


completeActivityWithUintData(bytes32,address,bytes32,uint256)

Writes data via BpmService and then completes the specified activity.


getId()

Returns this account's ID


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

completeActivityWithAddressData(bytes32,address,bytes32,address)

CALL
completeActivityWithAddressData(bytes32,address,bytes32,address)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the address value of the data

Return

error code if the completion failed

completeActivityWithBoolData(bytes32,address,bytes32,bool)

CALL
completeActivityWithBoolData(bytes32,address,bytes32,bool)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bool value of the data

Return

error code if the completion failed

completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

CALL
completeActivityWithBytes32Data(bytes32,address,bytes32,bytes32)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the bytes32 value of the data

Return

error code if the completion failed

completeActivityWithIntData(bytes32,address,bytes32,int256)

CALL
completeActivityWithIntData(bytes32,address,bytes32,int256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the int value of the data

Return

error code if the completion failed

completeActivityWithStringData(bytes32,address,bytes32,string)

CALL
completeActivityWithStringData(bytes32,address,bytes32,string)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the string value of the data

Return

error code if the completion failed

completeActivityWithUintData(bytes32,address,bytes32,uint256)

CALL
completeActivityWithUintData(bytes32,address,bytes32,uint256)

Parameters

_activityInstanceId // the task ID
_dataMappingId // the id of the dataMapping that points to data storage slot
_service // the BpmService required for lookup and access to the BpmServiceDb
_value // the uint value of the data

Return

error code if the completion failed

getId()

CALL
getId()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

bpm-model

BpmModelLib API Library

The BpmModelLib API Library contract is found within the bpm-model bundle.

resolve(BpmModel.TransitionCondition storage,address)

Resolves the given TransitionCondition agaist the provided DataStorage.


resolveConditionalDataLocation(DataStorageUtils.ConditionalData storage,address)

Returns the resolved location of the data specified by the data mapping for the specified ActivityInstance. REVERTS if: - the provided ConditionalData cannot be resolved to a DataStorage address


resolveRightHandValueAsAddress(BpmModel.TransitionCondition storage,address)

Resolves the given TransitionCondition value as an address using the provided DataStorage. REVERTS: if the given condition does not have a right-hand side value (conditional or primitive)


resolveRightHandValueAsBool(BpmModel.TransitionCondition storage,address)

Resolves the given TransitionCondition value as a bool using the provided DataStorage. REVERTS: if the given condition does not have a right-hand side value (conditional or primitive)


resolveRightHandValueAsBytes32(BpmModel.TransitionCondition storage,address)

Resolves the given TransitionCondition value as a bytes32 using the provided DataStorage. REVERTS: if the given condition does not have a right-hand side value (conditional or primitive)


resolveRightHandValueAsInt(BpmModel.TransitionCondition storage,address)

Resolves the given TransitionCondition value as a int using the provided DataStorage. REVERTS: if the given condition does not have a right-hand side value (conditional or primitive)


resolveRightHandValueAsString(BpmModel.TransitionCondition storage,address)

Resolves the given TransitionCondition value as a string using the provided DataStorage. REVERTS: if the given condition does not have a right-hand side value (conditional or primitive)


resolveRightHandValueAsUint(BpmModel.TransitionCondition storage,address)

Resolves the given TransitionCondition value as a uint using the provided DataStorage. REVERTS: if the given condition does not have a right-hand side value (conditional or primitive)


resolve(BpmModel.TransitionCondition storage,address)

CALL
resolve(BpmModel.TransitionCondition

Parameters

_condition // the transition condition
_dataStorage // a DataStorage contract address to use for data lookup for BOTH left- and right-hand side conditions (unless they point to an explicit DataStorage address that may differ from the provided one).

Return

true if the condition evaluated to true, false otherwise

resolveConditionalDataLocation(DataStorageUtils.ConditionalData storage,address)

CALL
resolveConditionalDataLocation(DataStorageUtils.ConditionalData

Parameters

_conditionalData // the DataStorageUtils.ConditionalData to resolve
_dataStorage // a DataStorage address to use for resolving any ID references

Return

dataStorage - the address of a DataStorage that contains the requested data. Default is the ProcessInstance itself, if none other specifieddataPath - the ID with which the data can be retrieved

resolveRightHandValueAsAddress(BpmModel.TransitionCondition storage,address)

CALL
resolveRightHandValueAsAddress(BpmModel.TransitionCondition

Parameters

_condition // a BpmModel.TransitionCondition
_dataStorage // the address of a DataStorage contract (only used for right-hand side conditional evaluation, not right-hand side primitive) 

Return

the result of resolving the TransitionCondition asn address value

resolveRightHandValueAsBool(BpmModel.TransitionCondition storage,address)

CALL
resolveRightHandValueAsBool(BpmModel.TransitionCondition

Parameters

_condition // a BpmModel.TransitionCondition
_dataStorage // the address of a DataStorage contract (only used for right-hand side conditional evaluation, not right-hand side primitive) 

Return

the result of resolving the TransitionCondition as bool value

resolveRightHandValueAsBytes32(BpmModel.TransitionCondition storage,address)

CALL
resolveRightHandValueAsBytes32(BpmModel.TransitionCondition

Parameters

_condition // a BpmModel.TransitionCondition
_dataStorage // the address of a DataStorage contract (only used for right-hand side conditional evaluation, not right-hand side primitive) 

Return

the result of resolving the TransitionCondition as bytes32 value

resolveRightHandValueAsInt(BpmModel.TransitionCondition storage,address)

CALL
resolveRightHandValueAsInt(BpmModel.TransitionCondition

Parameters

_condition // a BpmModel.TransitionCondition
_dataStorage // the address of a DataStorage contract (only used for right-hand side conditional evaluation, not right-hand side primitive) 

Return

the result of resolving the TransitionCondition as int value

resolveRightHandValueAsString(BpmModel.TransitionCondition storage,address)

CALL
resolveRightHandValueAsString(BpmModel.TransitionCondition

Parameters

_condition // a BpmModel.TransitionCondition
_dataStorage // the address of a DataStorage contract (only used for right-hand side conditional evaluation, not right-hand side primitive) 

Return

the result of resolving the TransitionCondition as string value

resolveRightHandValueAsUint(BpmModel.TransitionCondition storage,address)

CALL
resolveRightHandValueAsUint(BpmModel.TransitionCondition

Parameters

_condition // a BpmModel.TransitionCondition
_dataStorage // the address of a DataStorage contract (only used for right-hand side conditional evaluation, not right-hand side primitive) 

Return

the result of resolving the TransitionCondition as uint value

DefaultProcessDefinition

The DefaultProcessDefinition contract is found within the bpm-model bundle.

addProcessInterfaceImplementation(address,bytes32)

Adds the specified process interface to the list of supported process interfaces of this ProcessDefinition The model address is allowed to be empty in which case this process definition's model will be used.


createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Creates a new activity definition with the specified parameters.


createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Create a data mapping for the specified activity and direction.


createGateway(bytes32,uint8)

Creates a new BpmModel.Gateway model element with the specified ID and type REVERTS: if the ID already exists


createTransition(bytes32,bytes32)

Creates a transition between the specified source and target objects.


createTransitionConditionForAddress(bytes32,bytes32,bytes32,bytes32,address,uint8,address)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object. REVERT: if the specified transition between the gateway and activity does not exist REVERT: if the specified activity is set as the default output of the gateway


createTransitionConditionForBool(bytes32,bytes32,bytes32,bytes32,address,uint8,bool)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object. REVERT: if the specified transition between the gateway and activity does not exist REVERT: if the specified activity is set as the default output of the gateway


createTransitionConditionForBytes32(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object. REVERT: if the specified transition between the gateway and activity does not exist REVERT: if the specified activity is set as the default output of the gateway


createTransitionConditionForDataStorage(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32,bytes32,address)

Creates a transition condition between the specified gateway and activity using the given parameters. The "lh..." parameters are used to construct a left-hand side DataStorageUtils.ConditionalData object while the "rh..." ones are used for a right-hand side DataStorageUtils.ConditionalData as comparison REVERT: if the specified transition between the gateway and activity does not exist REVERT: if the specified activity is set as the default output of the gateway


createTransitionConditionForInt(bytes32,bytes32,bytes32,bytes32,address,uint8,int256)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object. REVERT: if the specified transition between the gateway and activity does not exist REVERT: if the specified activity is set as the default output of the gateway


createTransitionConditionForString(bytes32,bytes32,bytes32,bytes32,address,uint8,string)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object. REVERT: if the specified transition between the gateway and activity does not exist REVERT: if the specified activity is set as the default output of the gateway


createTransitionConditionForUint(bytes32,bytes32,bytes32,bytes32,address,uint8,uint256)

Creates a transition condition between the specified gateway and activity using the given parameters. The parameters dataPath, dataStorageId, and dataStorage are used to construct a left-hand side DataStorageUtils.ConditionalData object. REVERT: if the specified transition between the gateway and activity does not exist REVERT: if the specified activity is set as the default output of the gateway


getActivitiesForParticipant(bytes32)

Returns the IDs of all activities connected to the given model participant. This function can be used to retrieve all user tasks belonging to the same "swimlane" in the model.


getActivityAtIndex(uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition


getActivityData(bytes32)

Returns information about the activity definition with the given ID.


getActivityGraphDetails(bytes32)

Returns connectivity details about the specified activity.


getElementType(bytes32)

Returns the ModelElementType for the element with the specified ID. REVERTS if: - the element does not exist to avoid returning 0 as a valid type.


getGatewayGraphDetails(bytes32)

Returns connectivity details about the specified gateway.


getId()

Returns the id of the process definition


getImplementedProcessInterfaceAtIndex(uint256)

Returns information about the process interface at the given index


getInDataMappingDetails(bytes32,bytes32)

Returns information about the IN data mapping of the specified activity with the given ID.


getInDataMappingIdAtIndex(bytes32,uint256)

Returns the ID of the IN data mapping of the specified activity at the specified index.


getInDataMappingKeys(bytes32)

Returns an array of the IN data mapping ids of the specified activity.


getModel()

Returns the ProcessModel which contains this process definition


getModelId()

Returns the ID of the model which contains this process definition


getNumberOfActivities()

Returns the number of activity definitions in this ProcessDefinition.


getNumberOfImplementedProcessInterfaces()

Returns the number of implemented process interfaces implemented by this ProcessDefinition


getNumberOfInDataMappings(bytes32)

Returns the number of IN data mappings for the specified activity.


getNumberOfOutDataMappings(bytes32)

Returns the number of OUT data mappings for the specified activity.


getOutDataMappingDetails(bytes32,bytes32)

Returns information about the OUT data mapping of the specified activity with the given ID.


getOutDataMappingIdAtIndex(bytes32,uint256)

Returns the ID of the OUT data mapping of the specified activity at the specified index.


getOutDataMappingKeys(bytes32)

Returns an array of the OUT data mapping ids of the specified activity.


getStartActivity()

Returns the ID of the start activity of this process definition. This value is set during the validate() function, if the process is valid.


implementsProcessInterface(address,bytes32)

indicates whether this ProcessDefinition implements the specified interface


isValid()

Returns the current validity state


modelElementExists(bytes32)

Returns whether the given ID belongs to a model element (gateway or activity) known in this ProcessDefinition.


resolveTransitionCondition(bytes32,bytes32,address)

Resolves a transition condition between the given source and target model elements using the provided DataStorage to lookup data. If no condition exists for the specified transition, the function will always return 'true' as default.


setDefaultTransition(bytes32,bytes32)

Sets the specified activity to be the default output (default transition) of the specified gateway. REVERT: if the specified transition between the gateway and activity does not exist


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


validate()

Validates the coherence of the process definition in terms of the diagram and its configuration and sets the valid flag. Currently performed validation: 1. There must be exactly one start activity, i.e. one activity with no predecessor


addProcessInterfaceImplementation(address,bytes32)

CALL
addProcessInterfaceImplementation(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

BaseErrors.RESOURCE_NOT_FOUND() if the specified interface cannot be located in the modelBaseErrors.NO_ERROR() upon successful creation.

createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

CALL
createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Parameters

_activityType // the BpmModel.ActivityType [TASK|SUBPROCESS]
_application // the application handling the execution of the activity
_assignee // the ID of the participant performing the activity (for USER tasks only)
_behavior // the BpmModel.TaskBehavior [SEND|SENDRECEIVE|RECEIVE]
_id // the activity ID
_multiInstance // whether the activity represents multiple instances
_subProcessDefinitionId // references a subprocess definition (only for SUBPROCESS ActivityType)
_subProcessModelId // references the model containg a subprocess definition (only for SUBPROCESS ActivityType)
_taskType // the BpmModel.TaskType [NONE|USER|SERVICE|EVENT]

Return

BaseErrors.RESOURCE_ALREADY_EXISTS() if an activity with the same ID already existsBaseErrors.INVALID_PARAM_VALUE() if an assignee is specified, but the BpmModel.TaskType is not USERBaseErrors.NULL_PARAM_NOT_ALLOWED() if BpmModel.TaskType is USER, but no assignee was specifiedBaseErrors.RESOURCE_NOT_FOUND() if an assignee is specified that does not exist in the modelBaseErrors.NO_ERROR() upon successful creation.

createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

CALL
createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Parameters

_accessPath // the access path offered by the application. If the application does not have any access paths, this field is used as an ID for the mapping.
_activityId // the ID of the activity in this ProcessDefinition
_dataPath // a data path (key) to use for data lookup on a DataStorage.
_dataStorage // an optional address of a DataStorage as basis for the data path other than the default one
_dataStorageId // an optional key to identify a DataStorage as basis for the data path other than the default one
_direction // the BpmModel.Direction [IN|OUT]

createGateway(bytes32,uint8)

CALL
createGateway(bytes32,uint8)

Parameters

_id // the ID under which to register the element
_type // a BpmModel.GatewayType

createTransition(bytes32,bytes32)

CALL
createTransition(bytes32,bytes32)

Parameters

_source // the start of the transition
_target // the end of the transition

Return

BaseErrors.NO_ERROR() upon successful creation.

createTransitionConditionForAddress(bytes32,bytes32,bytes32,bytes32,address,uint8,address)

CALL
createTransitionConditionForAddress(bytes32,bytes32,bytes32,bytes32,address,uint8,address)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side primitive comparison value

createTransitionConditionForBool(bytes32,bytes32,bytes32,bytes32,address,uint8,bool)

CALL
createTransitionConditionForBool(bytes32,bytes32,bytes32,bytes32,address,uint8,bool)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side primitive comparison value

createTransitionConditionForBytes32(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32)

CALL
createTransitionConditionForBytes32(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side primitive comparison value

createTransitionConditionForDataStorage(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32,bytes32,address)

CALL
createTransitionConditionForDataStorage(bytes32,bytes32,bytes32,bytes32,address,uint8,bytes32,bytes32,address)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_gatewayId // the ID of a gateway in this ProcessDefinition
_lhDataPath // the left-hand side dataPath condition
_lhDataStorage // the left-hand side dataStorage condition
_lhDataStorageId // the left-hand side dataStorageId condition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_rhDataPath // the right-hand side dataPath condition
_rhDataStorage // the right-hand side dataStorage condition
_rhDataStorageId // the right-hand side dataStorageId condition

createTransitionConditionForInt(bytes32,bytes32,bytes32,bytes32,address,uint8,int256)

CALL
createTransitionConditionForInt(bytes32,bytes32,bytes32,bytes32,address,uint8,int256)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side primitive comparison value

createTransitionConditionForString(bytes32,bytes32,bytes32,bytes32,address,uint8,string)

CALL
createTransitionConditionForString(bytes32,bytes32,bytes32,bytes32,address,uint8,string)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side primitive comparison value

createTransitionConditionForUint(bytes32,bytes32,bytes32,bytes32,address,uint8,uint256)

CALL
createTransitionConditionForUint(bytes32,bytes32,bytes32,bytes32,address,uint8,uint256)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_dataPath // the left-hand side dataPath condition
_dataStorage // the left-hand side dataStorage condition
_dataStorageId // the left-hand side dataStorageId condition
_gatewayId // the ID of a gateway in this ProcessDefinition
_operator // the uint8 representation of a DataStorageUtils.COMPARISON_OPERATOR
_value // the right-hand side primitive comparison value

getActivitiesForParticipant(bytes32)

CALL
getActivitiesForParticipant(bytes32)

Parameters

_participantId // the ID of a participant in the model

Return

an array of activity IDs

getActivityAtIndex(uint256)

CALL
getActivityAtIndex(uint256)

Parameters

_index // the index position

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(bytes32)

CALL
getActivityData(bytes32)

Parameters

_id // the bytes32 id of the activity definition

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getActivityGraphDetails(bytes32)

CALL
getActivityGraphDetails(bytes32)

Parameters

_id // the ID of an activity

Return

predecessor - the ID of its predecessor model elementsuccessor - the ID of its successor model element

getElementType(bytes32)

CALL
getElementType(bytes32)

Parameters

_id // the ID of a model element

Return

the BpmModel.ModelElementType

getGatewayGraphDetails(bytes32)

CALL
getGatewayGraphDetails(bytes32)

Parameters

_id // the ID of a gateway

Return

inputs - the IDs of model elements that are inputs to this gatewayoutputs - the IDs of model elements that are outputs of this gatewaygatewayType - the BpmModel.GatewayTypedefaultOutput - the default output connection (applies only to XOR|OR type gateways)

getId()

CALL
getId()

Return

bytes32 id of the process definition

getImplementedProcessInterfaceAtIndex(uint256)

CALL
getImplementedProcessInterfaceAtIndex(uint256)

Parameters

_idx // the index position

Return

modelAddress the interface's modelinterfaceId the interface ID

getInDataMappingDetails(bytes32,bytes32)

CALL
getInDataMappingDetails(bytes32,bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_id // the data mapping ID

Return

dataMappingId the id of the data mappingaccessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getInDataMappingIdAtIndex(bytes32,uint256)

CALL
getInDataMappingIdAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

the mapping ID, if it exists

getInDataMappingKeys(bytes32)

CALL
getInDataMappingKeys(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the data mapping ids

getModel()

CALL
getModel()

Return

the ProcessModel reference

getModelId()

CALL
getModelId()

Return

the model ID

getNumberOfActivities()

CALL
getNumberOfActivities()

Return

the number of activity definitions

getNumberOfImplementedProcessInterfaces()

CALL
getNumberOfImplementedProcessInterfaces()

Return

the number of process interfaces

getNumberOfInDataMappings(bytes32)

CALL
getNumberOfInDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of IN data mappings

getNumberOfOutDataMappings(bytes32)

CALL
getNumberOfOutDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of OUT data mappings

getOutDataMappingDetails(bytes32,bytes32)

CALL
getOutDataMappingDetails(bytes32,bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_id // the data mapping ID

Return

dataMappingId the id of the data mappingaccessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getOutDataMappingIdAtIndex(bytes32,uint256)

CALL
getOutDataMappingIdAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

the mapping ID, if it exists

getOutDataMappingKeys(bytes32)

CALL
getOutDataMappingKeys(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the data mapping ids

getStartActivity()

CALL
getStartActivity()

Return

the ID of the identified start activity

implementsProcessInterface(address,bytes32)

CALL
implementsProcessInterface(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

true if the interface is supported, false otherwise

isValid()

CALL
isValid()

Return

true if valid, false otherwise

modelElementExists(bytes32)

CALL
modelElementExists(bytes32)

Parameters

_id // the ID of a model element

Return

true if it exists, false otherwise

resolveTransitionCondition(bytes32,bytes32,address)

CALL
resolveTransitionCondition(bytes32,bytes32,address)

Parameters

_dataStorage // the address of a DataStorage.
_sourceId // the ID of a model element in this ProcessDefinition, e.g. a gateway
_targetId // the ID of a model element in this ProcessDefinition, e.g. an activity

Return

true if the condition evaluated to 'true' or if no condition exists, false otherwise

setDefaultTransition(bytes32,bytes32)

CALL
setDefaultTransition(bytes32,bytes32)

Parameters

_activityId // the ID of an activity in this ProcessDefinition
_gatewayId // the ID of a gateway in this ProcessDefinition

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

validate()

CALL
validate()

Return

result - boolean indicating validityerrorMessage - empty string if valid, otherwise contains a hint what failed

DefaultProcessModel

The DefaultProcessModel contract is found within the bpm-model bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the specified listener to the specified event.


addParticipant(bytes32,address,bytes32,bytes32,address)

Adds a participant with the specified ID and attributes to this ProcessModel


addProcessInterface(bytes32)

Adds a process interface declaration to this ProcessModel that process definitions can refer to


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createProcessDefinition(bytes32)

Creates a new process definition with the given parameters in this ProcessModel


fireActivityDefinitionUpdateEvent(bytes32)

To be called by a registered process definition to signal an update. Causes the ProcessModel to emit an update event on behalf of the msg.sender


fireProcessDefinitionUpdateEvent()

To be called by a registered process definition to signal an update. Causes the ProcessModel to emit an update event on behalf of the msg.sender


getAuthor()

Returns model author address


getConditionalParticipant(bytes32,bytes32,address)

Returns the participant ID in this model that matches the given ConditionalData parameters.


getDiagram()

Returns the HOARD file information of the model's diagram


getId()

Returns the ID of this contract.


getName()

Returns the name of this contract.


getNumberOfParticipants()

Returns the number of participants defined in this ProcessModel


getNumberOfProcessDefinitions()

Returns the number of process definitions in this ProcessModel


getNumberOfProcessInterfaces()

Returns the number of process interfaces declared in this ProcessModel


getParticipantAtIndex(uint256)

Returns the ID of the participant at the given index


getParticipantData(bytes32)

Returns information about the participant with the given ID


getProcessDefinition(bytes32)

Returns the address of the ProcessDefinition with the specified ID


getProcessDefinitionAtIndex(uint256)

Returns the address for the ProcessDefinition at the given index


getProcessDefinitionData(address)

Returns information about the ProcessDefinition at the given address


getVersion()

Returns the version as 3-digit array


hasParticipant(bytes32)

Returns whether a participant with the specified ID exists in this ProcessModel


hasProcessInterface(bytes32)

Returns whether a process interface with the specified ID exists in this ProcessModel


isPrivate()

Returns whether the model is private


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the specified listener from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

addParticipant(bytes32,address,bytes32,bytes32,address)

CALL
addParticipant(bytes32,address,bytes32,bytes32,address)

Parameters

_account // the address of a participant account
_dataPath // the field key under which to locate the conditional participant
_dataStorage // the address of a DataStorage contract to find a conditional participant
_dataStorageId // a field key in a known DataStorage containing an address of another DataStorage contract
_id // the participant ID

Return

BaseErrors.INVALID_PARAM_VALUE() if both participant and conditional participant are being attempted to be set or if the config for a conditional participant is missing the _dataPathBaseErrors.NO_ERROR() if successful

addProcessInterface(bytes32)

CALL
addProcessInterface(bytes32)

Parameters

_interfaceId // the ID of the interface

Return

BaseErrors.RESOURCE_ALREADY_EXISTS() if an interface with the given ID already exists, BaseErrors.NO_ERROR() otherwise

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createProcessDefinition(bytes32)

CALL
createProcessDefinition(bytes32)

Parameters

_id // the process ID

Return

error - BaseErrors.RESOURCE_ALREADY_EXISTS(), if a process definition with the same ID already exists, BaseErrors.NO_ERROR() otherwisenewAddress - the address of the new ProcessDefinition when successful

fireActivityDefinitionUpdateEvent(bytes32)

CALL
fireActivityDefinitionUpdateEvent(bytes32)

fireProcessDefinitionUpdateEvent()

CALL
fireProcessDefinitionUpdateEvent()

getAuthor()

CALL
getAuthor()

Return

address - model author

getConditionalParticipant(bytes32,bytes32,address)

CALL
getConditionalParticipant(bytes32,bytes32,address)

Parameters

_dataPath // a data path
_dataStorage // the address of a DataStorage
_dataStorageId // the path to a DataStorage

Return

the ID of a participant or an empty bytes32, if no matching participant exists

getDiagram()

CALL
getDiagram()

Return

location - the HOARD addresssecret - the HOARD secret

getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfParticipants()

CALL
getNumberOfParticipants()

Return

the number of participants

getNumberOfProcessDefinitions()

CALL
getNumberOfProcessDefinitions()

Return

the number of process definitions

getNumberOfProcessInterfaces()

CALL
getNumberOfProcessInterfaces()

Return

the number of process interfaces

getParticipantAtIndex(uint256)

CALL
getParticipantAtIndex(uint256)

Parameters

_idx // the index position

Return

the participant ID, if it exists

getParticipantData(bytes32)

CALL
getParticipantData(bytes32)

Parameters

_id // the participant ID

Return

location the applications contract address, only available for a service participantmethod the function signature of the participant, only available for a service participantwebForm the form identifier (formHash) of the web participant, only available for a web participant

getProcessDefinition(bytes32)

CALL
getProcessDefinition(bytes32)

Parameters

_id // the process ID

Return

the address of the process definition, if it exists

getProcessDefinitionAtIndex(uint256)

CALL
getProcessDefinitionAtIndex(uint256)

Parameters

_idx // the index position

Return

the address of the ProcessDefinition, if it exists

getProcessDefinitionData(address)

CALL
getProcessDefinitionData(address)

Parameters

_processDefinition // the address

Return

id the process IDinterfaceId the first process interface the process definition supportsmodelId the id of the model to which this process definition belongs

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

hasParticipant(bytes32)

CALL
hasParticipant(bytes32)

Parameters

_id // the participant ID

Return

true if it exists, false otherwise

hasProcessInterface(bytes32)

CALL
hasProcessInterface(bytes32)

Parameters

_interfaceId // the interface ID

Return

true if it exists, false otherwise

isPrivate()

CALL
isPrivate()

Return

bool - if model is private

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

DefaultProcessModelRepository

The DefaultProcessModelRepository contract is found within the bpm-model bundle.

acceptDatabase(address)

Implementation of DbInterchangeable.acceptDatabase(address). Sets the provided database as this contract's database, if this contract has been granted system ownership of the database. This function can only be called from the upgradeOwner or from another contract that shares the same upgradeOwner (the second scenario applies when the database is migrated from a previous version as part of an upgrade). REVERTS if: - the msg.sender is neither the uprade owner nor another UpgradeOwned contract with the same upgrade owner


activateModel(address)

Activates the given ProcessModel and deactivates any previously activated model version of the same ID


addModel(address)

Adds the given ProcessModel to this repository.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createProcessModel(bytes32,bytes32,uint8[3],address,bool,bytes32,bytes32)

Factory function to instantiate a ProcessModel. The model is automatically added to this repository.


eventFired(bytes32,address)

Overwrites AbstractEventListener.eventFired to receive UPDATE_PROCESS_MODEL and UPDATE_PROCESS_DEFINITION events from registered models.


eventFired(bytes32,address,address)

See EventListener.eventFired(bytes32,address,address)


eventFired(bytes32,address,bytes32)

Overwrites AbstractEventListener.eventFired to receive UPDATE_ACTIVITY_DEFINITION events from registered models.


eventFired(bytes32,address,bytes32,address)

See EventListener.eventFired(bytes32,address,bytes32,address)


eventFired(bytes32,address,string)

See EventListener.eventFired(bytes32,address,string)


eventFired(bytes32,address,uint256)

See EventListener.eventFired(bytes32,address,uint)


getActivityAtIndex(address,address,uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition The first param "address" is the model address. It's not named explicitly to avoid compiler warnings due to it not being used.


getActivityData(address,address,bytes32)

Returns information about the activity definition with the given ID. The first param "address" is the model address. It's not named explicitly to avoid compiler warnings due to it not being used.


getModel(bytes32)

Returns the address of the activated model with the given ID


getModelAtIndex(uint256)

Returns the address of the ProcessModel at the given index position, if it exists


getModelByVersion(bytes32,uint8[3])

Returns the address of the model with the given ID and version


getModelData(address)

Returns information about the ProcessModel at the given address


getNumberOfActivities(address,address)

Returns the number of Activity Definitions in the specified Process Definition The first param "address" is the model address. It's not named explicitly to avoid compiler warnings due to it not being used.


getNumberOfModels()

Returns the number of models in this repository.


getNumberOfProcessDefinitions(address)

Returns the number of process definitions in the specified model


getProcessDefinition(bytes32,bytes32)

Returns the process definition address when the model ID and process definition ID are provided


getProcessDefinitionAtIndex(address,uint256)

Returns the address of the ProcessDefinition at the specified index position of the given model


getProcessDefinitionData(address,address)

Returns data about the specified ProcessDefinition in the specified ProcessModel


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


migrateFrom(address)

Empty implementation of Migratable.migrateFrom(address).


migrateTo(address)

Implementation of Migratable.migrateTo(address) that transfers system ownership of the database in this contract to the successor and calls DbInterchangeable.acceptDatabase(address) on the successor. REVERTS if: - the database contract was not accepted by the successor


minor()

returns the minor version number


patch()

returns the patch version number


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull) REVERTS if: - Either migrateTo or migrateFrom were not successful


acceptDatabase(address)

CALL
acceptDatabase(address)

Parameters

_db // the database contract

Return

true if it was accepted, false otherwise

activateModel(address)

CALL
activateModel(address)

Parameters

_model // the ProcessModel to activate

Return

BaseErrors.RESOURCE_NOT_FOUND() if the model ID and version is not registered in the repositoryBaseErrors.INVALID_STATE() if the model lookup produces an empty addressBaseErrors.INVALID_STATE_CHANGE() if the model registered model with the same ID and version has a different address than the specified one

addModel(address)

CALL
addModel(address)

Parameters

_model // the ProcessModel to add

Return

BaseErrors.RESOURCE_ALREADY_EXISTS() if a model with the same ID and version already existsBaseErrors.NO_ERROR() when added successfully

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createProcessModel(bytes32,bytes32,uint8[3],address,bool,bytes32,bytes32)

CALL
createProcessModel(bytes32,bytes32,uint8[3],address,bool,bytes32,bytes32)

Parameters

_author // the model author
_hoardAddress // the HOARD address of the model file
_hoardSecret // the HOARD secret of the model file
_id // the model ID
_isPrivate // indicates if the model is private
_name // the model name
_version // the model version

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the event source (process model)

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_activityId // the activityId
_event // the event name
_source // the event source (process model)

eventFired(bytes32,address,bytes32,address)

CALL
eventFired(bytes32,address,bytes32,address)

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

getActivityAtIndex(address,address,uint256)

CALL
getActivityAtIndex(address,address,uint256)

Parameters

_index // the index position
_processDefinition // a Process Definition address

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(address,address,bytes32)

CALL
getActivityData(address,address,bytes32)

Parameters

_id // the bytes32 id of the activity definition
_processDefinition // a Process Definition address

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getModel(bytes32)

CALL
getModel(bytes32)

Parameters

_id // the model ID

Return

the model address, if it exists and has an active version

getModelAtIndex(uint256)

CALL
getModelAtIndex(uint256)

Parameters

_idx // the index position

Return

the model address

getModelByVersion(bytes32,uint8[3])

CALL
getModelByVersion(bytes32,uint8[3])

Parameters

_id // the model ID
_version // the model version

Return

the model address, if found

getModelData(address)

CALL
getModelData(address)

Parameters

_model // the ProcessModel address

Return

id - the model IDname - the model nameversionMajor - the model's major versionversionMinor - the model's minor versionversionPatch - the model's patch versionauthor - the model's authorisPrivate - indicates if model is privateactive - whether the model is activediagramAddress - the HOARD address of the model diagram filediagramSecret - the HOARD secret of the model diagram file

getNumberOfActivities(address,address)

CALL
getNumberOfActivities(address,address)

Parameters

_processDefinition // a Process Definition address

Return

uint - the number of Activity Definitions

getNumberOfModels()

CALL
getNumberOfModels()

Return

size - the number of models

getNumberOfProcessDefinitions(address)

CALL
getNumberOfProcessDefinitions(address)

Parameters

_model // a ProcessModel address

Return

size - the number of process definitions

getProcessDefinition(bytes32,bytes32)

CALL
getProcessDefinition(bytes32,bytes32)

Parameters

_modelId // - the ProcessModel ID

Return

_processId - the ProcessDefinition IDaddress - the ProcessDefinition address

getProcessDefinitionAtIndex(address,uint256)

CALL
getProcessDefinitionAtIndex(address,uint256)

Parameters

_idx // the index position
_model // a ProcessModel address

Return

the ProcessDefinition address, if it exists

getProcessDefinitionData(address,address)

CALL
getProcessDefinitionData(address,address)

Parameters

_model // a ProcessModel address
_processDefinition // a ProcessDefinition address

Return

id - the ProcessDefinition IDinterfaceId - the ProcessDefinition's first interface IDmodelId the id of the model to which this process definition belongs

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Return

always true

migrateTo(address)

CALL
migrateTo(address)

Parameters

_successor // the successor contract to which to migrate the database

Return

true if the database was successfully accepted by the successor, otherwise a REVERT is triggered to rollback the change of system ownership.

minor()

CALL
minor()

patch()

CALL
patch()

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the address of a Versioned contract that replaces this one

Return

true if the upgrade was successful, otherwise a REVERT is triggered to rollback any changes from the upgrade

ProcessModelRepositoryDb Interface

The ProcessModelRepositoryDb Interface contract is found within the bpm-model bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

commons-auth

AuthorizationsManager

The AuthorizationsManager contract is found within the commons-auth bundle.

addRole(bytes32,address,bytes32)

Adds a role to an account in a AuthorizationsRepository


getRepository(bytes32)

Returns the address of the repository with the specified key, if it exists


hasRole(address,bytes32)

Indicates whether an account has a role in any known AuthorizationsRepository


removeRole(bytes32,address,bytes32)

Removes a role from an account in a AuthorizationsRepository


addRole(bytes32,address,bytes32)

CALL
addRole(bytes32,address,bytes32)

Parameters

_account // account
_repository // AuthorizationsRepository
_role // role

Return

error NO_ERROR, RESOURCE_ERROR, or RESOURCE_NOT_FOUND

getRepository(bytes32)

CALL
getRepository(bytes32)

Parameters

_key // the repository identifier

Return

the address or 0x0, if the repository does not exist

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

Parameters

_account // account
_role // role

Return

true if the role-account association can be found in a registered repository, false otherwise

removeRole(bytes32,address,bytes32)

CALL
removeRole(bytes32,address,bytes32)

Parameters

_account // account
_repository // AuthorizationsRepository
_role // role

Return

error NO_ERROR, RESOURCE_ERROR, or RESOURCE_NOT_FOUND

AuthorizationsRepository Interface

The AuthorizationsRepository Interface contract is found within the commons-auth bundle.

addRole(address,bytes32)

This function associates the given address with the specified role in the implementing repository. The function should return an error code indicating success or failure.


hasRole(address,bytes32)

This function allows detection of whether the given address is associated with the specified role in the implementing repository.


removeRole(address,bytes32)

This function disassociates the given address from the specified role in the implementing repository. The function should return an error code indicating success or failure.


addRole(address,bytes32)

CALL
addRole(address,bytes32)

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

removeRole(address,bytes32)

CALL
removeRole(address,bytes32)

ChainAutorizations

The ChainAutorizations contract is found within the commons-auth bundle.

addRole(address,bytes32)

Associates the given account with the specified role


hasRole(address,bytes32)

Indicates whether the given account has the specified role


removeRole(address,bytes32)

Removes the given account from the specified role


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


addRole(address,bytes32)

CALL
addRole(address,bytes32)

Parameters

_account // account
_role // role

Return

error NO_ERROR or RUNTIME_ERROR

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

Parameters

_account // account
_role // role

Return

true if the account has the role, false otherwise

removeRole(address,bytes32)

CALL
removeRole(address,bytes32)

Parameters

_account // account
_role // role

Return

error NO_ERROR or RUNTIME_ERROR

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ParticipantsManagerDb

The ParticipantsManagerDb contract is found within the commons-auth bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

SecureNativeAuthorizations Interface

The SecureNativeAuthorizations Interface contract is found within the commons-auth bundle.

addRole(address,bytes32)

Adds a role to an account


hasBase(address,uint64)

Indicates whether an account has a subset of permissions set


hasRole(address,bytes32)

Indicates whether an account has a role


removeRole(address,bytes32)

Removes a role from an account


setBase(address,uint64,bool)

Sets the permission flags for an account. Makes them explicitly set (on or off).


setGlobal(uint64,bool)

Sets the global (default) permissions flags for the entire chain


unsetBase(address,uint64)

Unsets the permissions flags for an account. Causes permissions being unset to fall through to global permissions.


addRole(address,bytes32)

CALL
addRole(address,bytes32)

Parameters

_account // account address
_role // role name

Return

result whether role was added

hasBase(address,uint64)

CALL
hasBase(address,uint64)

Parameters

_account // account address
_permission // the permissions flags (mask) to check whether enabled against base permissions for the account

Return

result whether account has the passed permissions flags set

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

Parameters

_account // account address
_role // role name

Return

result whether account has role

removeRole(address,bytes32)

CALL
removeRole(address,bytes32)

Parameters

_account // account address
_role // role name

Return

result whether role was removed

setBase(address,uint64,bool)

CALL
setBase(address,uint64,bool)

Parameters

_account // account address
_permission // the base permissions flags to set for the account
_set // whether to set or unset the permissions flags at the account level

Return

result the effective permissions flags on the account after the call

setGlobal(uint64,bool)

CALL
setGlobal(uint64,bool)

Parameters

_permission // the permissions flags to set
_set // whether to set (or unset) the permissions flags

Return

result the global permissions flags after the call

unsetBase(address,uint64)

CALL
unsetBase(address,uint64)

Parameters

_account // account address
_permission // the permissions flags to unset for the account

Return

result the effective permissions flags on the account after the call

commons-base

Destructible

The Destructible contract is found within the commons-base bundle.

destroy()

Transfers this contract's value to the owner and frees up storage


isDestructible()

Function that can be actively checked to detect if the contract is a destructible contract.


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


destroy()

CALL
destroy()

isDestructible()

CALL
isDestructible()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

commons-collections

VersionLinked

The VersionLinked contract is found within the commons-collections bundle.

acceptVersionLink(address)

Adds the given VersionLinked contract into the linked version list or returns an error, if the operation is not possible


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getPredecessor()

Returns the predecessor version


getSuccessor()

Returns the successor version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


acceptVersionLink(address)

CALL
acceptVersionLink(address)

Parameters

_link // a new VersionedLink contract.

Return

BaseErrors.NO_ERROR() if the given VersionLinked instance was successfully placed into the linked version list.
BaseErrors.NULL_PARAM_NOT_ALLOWED() if the _newPredecessor is empty (null address).
BaseErrors.INVALID_STATE() if the given VersionLinked instance has a different owner than this contract.
BaseErrors.INVALID_PARAM_VALUE() if the given VersionLinked instance has the same version or address as this contract.

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getPredecessor()

CALL
getPredecessor()

Return

the address of the predecessor or 0x0 if not set

getSuccessor()

CALL
getSuccessor()

Return

the address of the successor or 0x0 if not set

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

VersionLinkedAppendOnly Interface

The VersionLinkedAppendOnly Interface contract is found within the commons-collections bundle.

appendNewVersion(address)

Appends the given version as the latest in version linked list


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getTargetVersion(uint8[3])

Retrieves the specified version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setLatest(address)

Sets the latest version, and recursively sets latest for preceeding links


setPredecessor()

Sets the predecessor to msg.sender who should also have the same owner


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


appendNewVersion(address)

CALL
appendNewVersion(address)

Return

error - failure to append due to various reasons

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getTargetVersion(uint8[3])

CALL
getTargetVersion(uint8[3])

Parameters

_targetVer // - the version to retrieve

Return

targetAddr - address of the version to retrieve, 0x0 if not found

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setLatest(address)

CALL
setLatest(address)

Parameters

_latest // - the latest version

Return

success - representing whether latest was successfully set for all links

setPredecessor()

CALL
setPredecessor()

Return

error - if a predecessor is already set (i.e. no overwriting allowed), or if there is a owner mismatch

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

commons-management

ContractManager

The ContractManager contract is found within the commons-management bundle.

addContract(string,address)

Adds the specified contract address to the locator under the given name.


addContractChangeListener(string)

Adds the msg.sender as a listener for change events for the contract registered with the given name


getContract(string)

returns the address of the contract registered under the specified name. TODO can be extended in the future to include version!


getContractDetails(string)

Returns detailed data for the contract with the given key


getContractKeyAtIndex(uint256)

Returns the primary key of the contract at the given index


getNumberOfContracts()

Returns the number of registered contracts.


removeContractChangeListener(string)

Removes the msg.sender from the list of listeners for the contract with the given name


addContract(string,address)

CALL
addContract(string,address)

Parameters

_address // the contract address
_name // the name to register

Return

the number of contracts registered after this operation

addContractChangeListener(string)

CALL
addContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

getContract(string)

CALL
getContract(string)

Parameters

_name // the registered name

Return

the address of the contract or 0x0

getContractDetails(string)

CALL
getContractDetails(string)

Parameters

_key // the string key

Return

contractAddress - contract's addressversion - the semantic version, if the contract supports the Versioned interface

getContractKeyAtIndex(uint256)

CALL
getContractKeyAtIndex(uint256)

Parameters

_index // the index position

Return

the string key under which the contract is registered

getNumberOfContracts()

CALL
getNumberOfContracts()

Return

the number of contracts in this ContractManager

removeContractChangeListener(string)

CALL
removeContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

ContractsManagerDb

The ContractsManagerDb contract is found within the commons-management bundle.

addContract(string,address)

Registers the given contract address under the specified name. An existing address at the same name will be overwritten.


addContractChangeListener(string,address)

Adds the specified listener for change events to the specified contract name, if it exists.


getContract(string)

Returns the address of a registered contract


getContractChangeListeners(string)

Returns the listeners subscribed to the given contract name


getContractDetails(string)

Returns detailed data for the contract with the given key


getContractKeyAtIndex(uint256)

Returns the primary key of the contract at the given index


getNumberOfContracts()

Returns the number of registered contracts.


removeContractChangeListener(string,address)

Removes the specified listener from the list of listeners for the specified contract name.


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


addContract(string,address)

CALL
addContract(string,address)

Parameters

_address // the contract's address to be registered
_name // the registration key

Return

the number of registered contracts after the specified contract was inserted

addContractChangeListener(string,address)

CALL
addContractChangeListener(string,address)

Parameters

_listener // the address of the listener
_name // the name of the contract to subscribe to

getContract(string)

CALL
getContract(string)

Parameters

_name // the registered key

Return

the contract address or 0x0, if it does not exist

getContractChangeListeners(string)

CALL
getContractChangeListeners(string)

Parameters

_name // the name of a registered contract

Return

the listeners as address[]

getContractDetails(string)

CALL
getContractDetails(string)

Parameters

_key // the string key

Return

contractAddress - contract's address

getContractKeyAtIndex(uint256)

CALL
getContractKeyAtIndex(uint256)

Parameters

_index // the index position

Return

the string key

getNumberOfContracts()

CALL
getNumberOfContracts()

Return

the number of contracts in this ContractManager

removeContractChangeListener(string,address)

CALL
removeContractChangeListener(string,address)

Parameters

_listener // the address of the listener
_name // the name of the contract to unsubscribe from

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

DOUG - Decentralized Organization Upgrade Guy

The DOUG - Decentralized Organization Upgrade Guy contract is found within the commons-management bundle.

deployContract(string,address)

Registers the contract with the given address under the specified ID and performs a deployment procedure which involves dependency injection and upgrades from previously deployed contracts with the same ID.


lookupContract(string)

Returns the address of a contract registered under the given ID.


deployContract(string,address)

CALL
deployContract(string,address)

Parameters

_address // the address of the contract
_id // the ID under which to register the contract

Return

true if successful, false otherwise

lookupContract(string)

CALL
lookupContract(string)

Parameters

_id // the ID under which the contract is registered

Return

the contract's address

DefaultContractManager

The DefaultContractManager contract is found within the commons-management bundle.

acceptDatabase(address)

Implementation of DbInterchangeable.acceptDatabase(address). Sets the provided database as this contract's database, if this contract has been granted system ownership of the database. This function can only be called from the upgradeOwner or from another contract that shares the same upgradeOwner (the second scenario applies when the database is migrated from a previous version as part of an upgrade). REVERTS if: - the msg.sender is neither the uprade owner nor another UpgradeOwned contract with the same upgrade owner


addContract(string,address)

Allows the systemOwner to add the given contract address under the specified name. An existing address at the same name will be overwritten. If the provided contract implements ContractLocatorEnabled, this ContractManager attempts to set itself as the ContractLocator and a REVERT is triggered, if setting the ContractLocator was unsuccessful.


addContractChangeListener(string)

Adds the msg.sender as a listener for change events for the contract registered with the given name.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getContract(string)

Returns the address of a registered contract


getContractDetails(string)

Returns detailed data for the contract with the given key


getContractKeyAtIndex(uint256)

Returns the primary key of the contract at the given index


getNumberOfContracts()

Returns the number of registered contracts.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


migrateFrom(address)

Empty implementation of Migratable.migrateFrom(address).


migrateTo(address)

Implementation of Migratable.migrateTo(address) that transfers system ownership of the database in this contract to the successor and calls DbInterchangeable.acceptDatabase(address) on the successor. REVERTS if: - the database contract was not accepted by the successor


minor()

returns the minor version number


patch()

returns the patch version number


removeContractChangeListener(string)

Removes the msg.sender from the list of listeners for the contract with the given name


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Upgrades this DefaultContractManager to the specified successor by transfering control over the database and updating the contractLocator reference in all managed contracts that implement ContractLocatorEnabled.


acceptDatabase(address)

CALL
acceptDatabase(address)

Parameters

_db // the database contract

Return

true if it was accepted, false otherwise

addContract(string,address)

CALL
addContract(string,address)

Parameters

_contract // the contract's address to be registered
_name // the registration key

Return

the number of registered contracts after the specified contract was inserted

addContractChangeListener(string)

CALL
addContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getContract(string)

CALL
getContract(string)

Parameters

_name // the registered key

Return

the contract address or 0x0, if it does not exist

getContractDetails(string)

CALL
getContractDetails(string)

Parameters

_key // the string key

Return

contractAddress - contract's addressversion - the semantic version, if the contract supports the Versioned interface

getContractKeyAtIndex(uint256)

CALL
getContractKeyAtIndex(uint256)

Parameters

_index // the index position

Return

the string key

getNumberOfContracts()

CALL
getNumberOfContracts()

Return

the number of contracts in this ContractManager

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Return

always true

migrateTo(address)

CALL
migrateTo(address)

Parameters

_successor // the successor contract to which to migrate the database

Return

true if the database was successfully accepted by the successor, otherwise a REVERT is triggered to rollback the change of system ownership.

minor()

CALL
minor()

patch()

CALL
patch()

removeContractChangeListener(string)

CALL
removeContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the new version of DefaultContractsManager

Return

true if successful, otherwise a REVERT is triggered to rollback any changes of the upgrade

DefaultDoug

The DefaultDoug contract is found within the commons-management bundle.

deployContract(string,address)

Registers the contract with the given address under the specified ID and performs a deployment procedure which involves dependency injection and upgrades from previously deployed contracts with the same ID. If the given contract implements Upgradeable, it must have the upgradeOwner set to this contract If the given contract implements ContractLocatorEnabled, it will be passed an instance of the ContractManager, so that it can perform dependency lookups and register for changes.


getContractManager()

Returns the address of the ContractManager used in this DefaultDoug


lookupContract(string)

Returns the address of a contract registered under the given ID.


setContractManager(address)

Allows the owner of this DefaultDoug to set or upgrade the ContractManager. REVERTS if: - this contract is not the system owner of the provided ContractManager - this contract is not the upgrade owner of the provided ContractManager


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


deployContract(string,address)

CALL
deployContract(string,address)

Parameters

_address // the address of the contract
_id // the ID under which to register the contract

Return

true if successful, false otherwise

getContractManager()

CALL
getContractManager()

Return

the address or 0x0 if it hasn't been set

lookupContract(string)

CALL
lookupContract(string)

Parameters

_id // the ID under which the contract is registered

Return

the contract's address

setContractManager(address)

CALL
setContractManager(address)

Parameters

_contractManager // a ContractManager address 

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

DelegateProxy

The DelegateProxy contract is found within the commons-management bundle.

getProxied()

Returns the proxied contract


getProxied()

CALL
getProxied()

Return

the address of the proxied contract

DougProxy

The DougProxy contract is found within the commons-management bundle.

getOwner()

Returns the owner of this DougProxy


getProxied()

Returns the proxied contract


setProxiedDoug(address)

Allows the owner to set the DOUG contract in this proxy to the given address.


getOwner()

CALL
getOwner()

Return

the owner address

getProxied()

CALL
getProxied()

Return

the address of the proxied contract

setProxiedDoug(address)

CALL
setProxiedDoug(address)

Parameters

_doug // the DOUG instance's address to proxy

OwnedDelegateProxy

The OwnedDelegateProxy contract is found within the commons-management bundle.

getProxied()

Returns the proxied contract


getProxied()

CALL
getProxied()

Return

the address of the proxied contract

TestDoug

The TestDoug contract is found within the commons-management bundle.

acceptDatabase(address)

Implementation of DbInterchangeable.acceptDatabase(address). Sets the provided database as this contract's database, if this contract has been granted system ownership of the database. This function can only be called from the upgradeOwner or from another contract that shares the same upgradeOwner (the second scenario applies when the database is migrated from a previous version as part of an upgrade). REVERTS if: - the msg.sender is neither the uprade owner nor another UpgradeOwned contract with the same upgrade owner


addContract(string,address)

Allows the systemOwner to add the given contract address under the specified name. An existing address at the same name will be overwritten. If the provided contract implements ContractLocatorEnabled, this ContractManager attempts to set itself as the ContractLocator and a REVERT is triggered, if setting the ContractLocator was unsuccessful.


addContractChangeListener(string)

Adds the msg.sender as a listener for change events for the contract registered with the given name.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


deployContract(string,address)

Deploys the given contract by adding it without performing any checks or upgrades from previous versions.


getContract(string)

Returns the address of a registered contract


getContractDetails(string)

Returns detailed data for the contract with the given key


getContractKeyAtIndex(uint256)

Returns the primary key of the contract at the given index


getNumberOfContracts()

Returns the number of registered contracts.


getVersion()

Returns the version as 3-digit array


lookupContract(string)

Returns the address registered under the given key


major()

returns the major version number


migrateFrom(address)

Empty implementation of Migratable.migrateFrom(address).


migrateTo(address)

Implementation of Migratable.migrateTo(address) that transfers system ownership of the database in this contract to the successor and calls DbInterchangeable.acceptDatabase(address) on the successor. REVERTS if: - the database contract was not accepted by the successor


minor()

returns the minor version number


patch()

returns the patch version number


removeContractChangeListener(string)

Removes the msg.sender from the list of listeners for the contract with the given name


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferUpgradeOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Upgrades this DefaultContractManager to the specified successor by transfering control over the database and updating the contractLocator reference in all managed contracts that implement ContractLocatorEnabled.


acceptDatabase(address)

CALL
acceptDatabase(address)

Parameters

_db // the database contract

Return

true if it was accepted, false otherwise

addContract(string,address)

CALL
addContract(string,address)

Parameters

_contract // the contract's address to be registered
_name // the registration key

Return

the number of registered contracts after the specified contract was inserted

addContractChangeListener(string)

CALL
addContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

deployContract(string,address)

CALL
deployContract(string,address)

Parameters

_address // the contract address
_id // the key under which to register the contract

Return

always true

getContract(string)

CALL
getContract(string)

Parameters

_name // the registered key

Return

the contract address or 0x0, if it does not exist

getContractDetails(string)

CALL
getContractDetails(string)

Parameters

_key // the string key

Return

contractAddress - contract's addressversion - the semantic version, if the contract supports the Versioned interface

getContractKeyAtIndex(uint256)

CALL
getContractKeyAtIndex(uint256)

Parameters

_index // the index position

Return

the string key

getNumberOfContracts()

CALL
getNumberOfContracts()

Return

the number of contracts in this ContractManager

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

lookupContract(string)

CALL
lookupContract(string)

Parameters

_id // the key to use for lookup

Return

the contract address or 0x0

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Return

always true

migrateTo(address)

CALL
migrateTo(address)

Parameters

_successor // the successor contract to which to migrate the database

Return

true if the database was successfully accepted by the successor, otherwise a REVERT is triggered to rollback the change of system ownership.

minor()

CALL
minor()

patch()

CALL
patch()

removeContractChangeListener(string)

CALL
removeContractChangeListener(string)

Parameters

_name // the key under which the contract is registered

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

transferUpgradeOwnership(address)

CALL
transferUpgradeOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

Parameters

_successor // the new version of DefaultContractsManager

Return

true if successful, otherwise a REVERT is triggered to rollback any changes of the upgrade

commons-standards

IsoCountries Interface

The IsoCountries Interface contract is found within the commons-standards bundle.

appendNewVersion(address)

Appends the given version as the latest in version linked list


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getTargetVersion(uint8[3])

Retrieves the specified version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setLatest(address)

Sets the latest version, and recursively sets latest for preceeding links


setPredecessor()

Sets the predecessor to msg.sender who should also have the same owner


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


appendNewVersion(address)

CALL
appendNewVersion(address)

Return

error - failure to append due to various reasons

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getTargetVersion(uint8[3])

CALL
getTargetVersion(uint8[3])

Parameters

_targetVer // - the version to retrieve

Return

targetAddr - address of the version to retrieve, 0x0 if not found

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setLatest(address)

CALL
setLatest(address)

Parameters

_latest // - the latest version

Return

success - representing whether latest was successfully set for all links

setPredecessor()

CALL
setPredecessor()

Return

error - if a predecessor is already set (i.e. no overwriting allowed), or if there is a owner mismatch

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

IsoCountries100 Interface

The IsoCountries100 Interface contract is found within the commons-standards bundle.

appendNewVersion(address)

Appends the given version as the latest in version linked list


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getTargetVersion(uint8[3])

Retrieves the specified version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setLatest(address)

Sets the latest version, and recursively sets latest for preceeding links


setPredecessor()

Sets the predecessor to msg.sender who should also have the same owner


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


appendNewVersion(address)

CALL
appendNewVersion(address)

Return

error - failure to append due to various reasons

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getTargetVersion(uint8[3])

CALL
getTargetVersion(uint8[3])

Parameters

_targetVer // - the version to retrieve

Return

targetAddr - address of the version to retrieve, 0x0 if not found

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setLatest(address)

CALL
setLatest(address)

Parameters

_latest // - the latest version

Return

success - representing whether latest was successfully set for all links

setPredecessor()

CALL
setPredecessor()

Return

error - if a predecessor is already set (i.e. no overwriting allowed), or if there is a owner mismatch

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

IsoCurrencies Interface

The IsoCurrencies Interface contract is found within the commons-standards bundle.

appendNewVersion(address)

Appends the given version as the latest in version linked list


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getTargetVersion(uint8[3])

Retrieves the specified version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setLatest(address)

Sets the latest version, and recursively sets latest for preceeding links


setPredecessor()

Sets the predecessor to msg.sender who should also have the same owner


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


appendNewVersion(address)

CALL
appendNewVersion(address)

Return

error - failure to append due to various reasons

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getTargetVersion(uint8[3])

CALL
getTargetVersion(uint8[3])

Parameters

_targetVer // - the version to retrieve

Return

targetAddr - address of the version to retrieve, 0x0 if not found

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setLatest(address)

CALL
setLatest(address)

Parameters

_latest // - the latest version

Return

success - representing whether latest was successfully set for all links

setPredecessor()

CALL
setPredecessor()

Return

error - if a predecessor is already set (i.e. no overwriting allowed), or if there is a owner mismatch

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

IsoCurrencies100 Interface

The IsoCurrencies100 Interface contract is found within the commons-standards bundle.

appendNewVersion(address)

Appends the given version as the latest in version linked list


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getTargetVersion(uint8[3])

Retrieves the specified version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setLatest(address)

Sets the latest version, and recursively sets latest for preceeding links


setPredecessor()

Sets the predecessor to msg.sender who should also have the same owner


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


appendNewVersion(address)

CALL
appendNewVersion(address)

Return

error - failure to append due to various reasons

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getTargetVersion(uint8[3])

CALL
getTargetVersion(uint8[3])

Parameters

_targetVer // - the version to retrieve

Return

targetAddr - address of the version to retrieve, 0x0 if not found

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setLatest(address)

CALL
setLatest(address)

Parameters

_latest // - the latest version

Return

success - representing whether latest was successfully set for all links

setPredecessor()

CALL
setPredecessor()

Return

error - if a predecessor is already set (i.e. no overwriting allowed), or if there is a owner mismatch

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

commons-utils

documents-commons

AbstractDocument

The AbstractDocument contract is found within the documents-commons bundle.

addVersion(string)

Adds the specified hash as a new version of the document. The msg.sender is registered as owner and the version creation date is set to now.


getName()

Returns the document's name


getNumberOfVersions()

Returns the number of versions of this document


getVersionCreated(string)

Returns the creation date of the specified version hash.


getVersionCreator(string)

Returns the address registered as the creator of the specified version hash.


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


addVersion(string)

CALL
addVersion(string)

Parameters

_hash // the version hash

Return

BaseErrors.NO_ERROR, BaseErrors.INSUFFICIENT_PRIVILEGES (as determined by calling canAddVersion(), or BaseErrors.RESOURCE_ALREADY_EXISTS if the version has been added before.

getName()

CALL
getName()

getNumberOfVersions()

CALL
getNumberOfVersions()

Return

the number of versions

getVersionCreated(string)

CALL
getVersionCreated(string)

Parameters

_hash // the desired version hash

Return

the creation date, or 0 if the version does not exist

getVersionCreator(string)

CALL
getVersionCreator(string)

Parameters

_hash // the desired version hash

Return

the creator address, or 0x0 if the version does not exist

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Agreement

The Agreement contract is found within the documents-commons bundle.

addSignatories(address[])

Adds the specified signatories to this agreement, if they are valid, and returns the number of added signatories. Empty addresses and already registered signatories are rejected.


addSignatory(address)

Adds a single signatory to this agreement


addVersion(string)

Adds the specified hash as a new version of the document. The msg.sender is registered as owner and the version creation date is set to now.


confirmExecutionVersion(string)

Registers the msg.sender as having confirmed/endorsed the specified document version as the execution version.


getConfirmedVersion()

Returns the confirmed version of this agreement, if it has been set.


getEndorsedVersion(address)

Get the document version endorsed by the specified signatory.


getName()

Returns the document's name


getNumberOfVersions()

Returns the number of versions of this document


getSignatoriesSize()

Returns the number of signatories of this agreement.


getVersionCreated(string)

Returns the creation date of the specified version hash.


getVersionCreator(string)

Returns the address registered as the creator of the specified version hash.


isConfirmedVersion(string)

Verify if the specified version hash is the confirmed version.


isEffective()

Returns whether this agreement is effective or not


isFullyConfirmed(string)

Determines if the submitted version has been signed by all signatories.


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


addSignatories(address[])

CALL
addSignatories(address[])

Parameters

_addresses // the signatories

Return

the number of added signatories

addSignatory(address)

CALL
addSignatory(address)

Parameters

_address // the address to add

Return

NO_ERROR, INVALID_PARAM_VALUE if address is empty, RESOURCE_ALREADY_EXISTS if address has already been registered

addVersion(string)

CALL
addVersion(string)

Parameters

_hash // the version hash

Return

BaseErrors.NO_ERROR, BaseErrors.INSUFFICIENT_PRIVILEGES (as determined by calling canAddVersion(), or BaseErrors.RESOURCE_ALREADY_EXISTS if the version has been added before.

confirmExecutionVersion(string)

CALL
confirmExecutionVersion(string)

Parameters

_version // the version

Return

BaseErrors.NO_ERROR(), BaseErrors.INVALID_PARAM_VALUE() if given version is empty, or BaseErrors.RESOURCE_NOT_FOUND() if the version does not exist

getConfirmedVersion()

CALL
getConfirmedVersion()

getEndorsedVersion(address)

CALL
getEndorsedVersion(address)

Parameters

_signatory // the signatory

Return

the version hash, if an endorsed version exists, or an uninitialized string

getName()

CALL
getName()

getNumberOfVersions()

CALL
getNumberOfVersions()

Return

the number of versions

getSignatoriesSize()

CALL
getSignatoriesSize()

Return

the number of signatories

getVersionCreated(string)

CALL
getVersionCreated(string)

Parameters

_hash // the desired version hash

Return

the creation date, or 0 if the version does not exist

getVersionCreator(string)

CALL
getVersionCreator(string)

Parameters

_hash // the desired version hash

Return

the creator address, or 0x0 if the version does not exist

isConfirmedVersion(string)

CALL
isConfirmedVersion(string)

Parameters

_version // the version

Return

true if the version matches the confirmed one, false otherwise

isEffective()

CALL
isEffective()

isFullyConfirmed(string)

CALL
isFullyConfirmed(string)

Parameters

_version // the version

Return

true if all configured signatories have signed that version, false otherwise

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

DefaultDocument

The DefaultDocument contract is found within the documents-commons bundle.

addVersion(string)

Adds the specified hash as a new version of the document. The msg.sender is registered as owner and the version creation date is set to now.


getName()

Returns the document's name


getNumberOfVersions()

Returns the number of versions of this document


getVersionCreated(string)

Returns the creation date of the specified version hash.


getVersionCreator(string)

Returns the address registered as the creator of the specified version hash.


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner. REVERTS if: - the new owner is empty


addVersion(string)

CALL
addVersion(string)

Parameters

_hash // the version hash

Return

BaseErrors.NO_ERROR, BaseErrors.INSUFFICIENT_PRIVILEGES (as determined by calling canAddVersion(), or BaseErrors.RESOURCE_ALREADY_EXISTS if the version has been added before.

getName()

CALL
getName()

getNumberOfVersions()

CALL
getNumberOfVersions()

Return

the number of versions

getVersionCreated(string)

CALL
getVersionCreated(string)

Parameters

_hash // the desired version hash

Return

the creation date, or 0 if the version does not exist

getVersionCreator(string)

CALL
getVersionCreator(string)

Parameters

_hash // the desired version hash

Return

the creator address, or 0x0 if the version does not exist

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Document Interface

The Document Interface contract is found within the documents-commons bundle.

addVersion(string)

Registers a new document version


getName()

Returns the document's name


getNumberOfVersions()

Returns the number of versions of this document


getVersionCreated(string)

Returns the creation date of the specified version hash


getVersionCreator(string)

Returns the account of the entity that created the specified version hash