mirror of https://github.com/embarklabs/embark.git
Add API docs for `contracts-manager`
parent
fbe6e2c933
commit
bd6491bd9f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue