error if account index is not found
This commit is contained in:
parent
f2ae58e754
commit
f35718b6c0
|
@ -191,6 +191,9 @@ class Deploy {
|
|||
// applying deployer account configuration, if any
|
||||
if (typeof contract.fromIndex == 'number') {
|
||||
deploymentAccount = accounts[contract.fromIndex];
|
||||
if (deploymentAccount === undefined) {
|
||||
return next("error deploying " + contract.className + ": no account found at index " + contract.fromIndex + " check the config");
|
||||
}
|
||||
}
|
||||
if (typeof contract.from == 'string' && typeof contract.fromIndex != 'undefined') {
|
||||
self.logger.warn('Both "from" and "fromIndex" are defined for contract "'+contract.className+'". Using "from" as deployer account.');
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"deploy": false
|
||||
},
|
||||
"SimpleStorage": {
|
||||
"fromIndex": 1,
|
||||
"args": [
|
||||
100
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue