Add API docs for `contracts-manager`

Pascal Precht 2020-02-18 09:53:18 +01:00
parent fbe6e2c933
commit bd6491bd9f
1 changed files with 61 additions and 1 deletions

@ -16,7 +16,7 @@
* [blockchain](#blockchain)
* [communication](#communication)
* compiler
* contracts-manager
* [contracts-manager](#contracts-manger)
* [deployment](#deployment)
* embarkjs
* [library-manager](#library-manager)
@ -416,6 +416,66 @@ module type: plugin component
* instantiates contracts in vanilla web3
* overrides require to return specified contracts
### contracts-manager
module type: stack component
#### API
##### requests
name: `contracts:reset`
Resets the internal contracts memory.
name: `contracts:build`
arguments:
* `contractsConfig` - ContractsConfig - Smart Contract configuration object
* `compiledContracts` - CompiledContracts - Map of compiled Smart Contract objects
Builds `Contract` objects from `contractsConfig` and `compiledContracts`.
name: `contracts:list`
Returns a list of built contracts.
name: `contracts:state`
Returns messages that describe the deployment state of each individual Smart Contract.
name: `contracts:contract`
arguments:
* `contractsName` - string - Name of contract to be returned
Returns a `Contract` by given `contractsName`
name: `contracts:add`
arguments:
* `contract` - `ContractConfig` - Configuration of single Smart Contract
Creates a `Contract` from `contract` and adds it to internal contract memory.
name: `contracts:all`
Returns list of Smart Contracts from internal contract memory.
name: `contracts:dependencies`
Returns contracts dependencies mapping based on currently compiled contracts (requires `contract:build` to be run first)
name: `contracts:contract:byTxHash`
arguments:
* `txHash` - string - A transaction hash
Returns a `Contract` by given hash.
name: `contracts:reset:dependencies`
Resets internal dependencies mapping.
### deployment
module type: stack component