mirror of https://github.com/embarklabs/embark.git
fix blockchain defaults for config-less dapps
This commit is contained in:
parent
a41bdf1b4a
commit
24d661a65e
|
@ -195,7 +195,7 @@ Config.prototype.loadBlockchainConfigFile = function() {
|
||||||
Config.prototype.loadContractsConfigFile = function() {
|
Config.prototype.loadContractsConfigFile = function() {
|
||||||
var defaultVersions = {
|
var defaultVersions = {
|
||||||
"web3": "1.0.0-beta",
|
"web3": "1.0.0-beta",
|
||||||
"solc": "0.4.17"
|
"solc": "0.4.25"
|
||||||
};
|
};
|
||||||
var versions = utils.recursiveMerge(defaultVersions, this.embarkConfig.versions || {});
|
var versions = utils.recursiveMerge(defaultVersions, this.embarkConfig.versions || {});
|
||||||
|
|
||||||
|
|
|
@ -59,11 +59,18 @@ var Blockchain = function(options) {
|
||||||
verbosity: this.blockchainConfig.verbosity
|
verbosity: this.blockchainConfig.verbosity
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.blockchainConfig === {} || JSON.stringify(this.blockchainConfig) === '{"enabled":true}') {
|
if (this.blockchainConfig === {} || this.blockchainConfig.default) {
|
||||||
this.config.account = {};
|
this.config.account = {};
|
||||||
this.config.account.password = fs.embarkPath("templates/boilerplate/config/development/password");
|
if (this.env === 'development') {
|
||||||
this.config.genesisBlock = fs.embarkPath("templates/boilerplate/config/development/genesis.json");
|
this.isDev = true;
|
||||||
|
} else {
|
||||||
|
this.config.account.password = fs.embarkPath("templates/boilerplate/config/privatenet/password");
|
||||||
|
this.config.genesisBlock = fs.embarkPath("templates/boilerplate/config/privatenet/genesis.json");
|
||||||
|
}
|
||||||
this.config.datadir = fs.dappPath(".embark/development/datadir");
|
this.config.datadir = fs.dappPath(".embark/development/datadir");
|
||||||
|
this.config.wsOrigins = "http://localhost:8000";
|
||||||
|
this.config.rpcCorsDomain = "http://localhost:8000";
|
||||||
|
this.config.targetGasLimit = 8000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
const spaceMessage = 'The path for %s in blockchain config contains spaces, please remove them';
|
const spaceMessage = 'The path for %s in blockchain config contains spaces, please remove them';
|
||||||
|
|
Loading…
Reference in New Issue