mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
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
|
// applying deployer account configuration, if any
|
||||||
if (typeof contract.fromIndex == 'number') {
|
if (typeof contract.fromIndex == 'number') {
|
||||||
deploymentAccount = accounts[contract.fromIndex];
|
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') {
|
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.');
|
self.logger.warn('Both "from" and "fromIndex" are defined for contract "'+contract.className+'". Using "from" as deployer account.');
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
"deploy": false
|
"deploy": false
|
||||||
},
|
},
|
||||||
"SimpleStorage": {
|
"SimpleStorage": {
|
||||||
|
"fromIndex": 1,
|
||||||
"args": [
|
"args": [
|
||||||
100
|
100
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user