A module for deploying Ethereum smart contracts.
npm install deploy-monster
Compile and deploy a contract from the values specified in opts
.
-
opts
- ADeployOpts
object.
#####Returns:
An Output
object.
Compile and deploy a contract from the values specified in a JSON config file.
-
configPath
- An absolute or relative path from the process current working directory to a JSON config file which can be parsed as aDeployOpts
object.
#####Returns:
An Output
object.
A nested object keyed by the names (as in the Solidity contract <Name> {
shared by the contracts' constructor functions) where the inner objects have the following properties:
-
file
[string] - An absolute or relative path from the process current working directory to the contract to be compiled. -
signingKey
[string] -
txParams
[TxParams
] -
args
[Array] - (optional, default[]
) -
web3Provider
[string] - (optional, defaulthttp://localhost:8545
) -
web3
[object] - (optional, default derived fromweb3Provider
)
See the exampleConf, for instance.
An object with the following properties:
-
name
[string] - The name of the contract. -
abi
[string] - The contract's ABI. -
address
[string] - The address at which the contract was deployed. -
txHash
[string] - The transaction hash of the contract deployment. -
bytecode
[string] - The contract's bytecode.
A nested object keyed by the names (as in the Solidity contract <Name> {
shared by the contracts' constructor functions) where the inner objects have the following properties:
-
nonce
[number] - (optional, default derived usingweb3.eth.getTransactionCount
on the address of thesigningKey
specified in theDeployOpts
) The nonce with which to send the deployment transaction. -
gas
[number] - (optional, default1000000
) -
gasPrice
[number] - (optional, default1
) -
value
[number] - (optional, default0
)