Make web3 provider URL configurable; default to infura #9

Merged
bumi merged 2 commits from configurable-provider into master 2017-05-13 15:06:34 +00:00
bumi commented 2017-05-12 15:20:01 +00:00 (Migrated from github.com)

This uses infura (kovan network) as the default web3 provider URL.

This uses infura (kovan network) as the default web3 provider URL.
raucao commented 2017-05-12 15:45:04 +00:00 (Migrated from github.com)

We're using our own dev chain now, so using a 3rd party node by default doesn't make much sense to me.

We're using our own dev chain now, so using a 3rd party node by default doesn't make much sense to me.
raucao (Migrated from github.com) reviewed 2017-05-12 15:46:20 +00:00
@@ -41,0 +39,4 @@
if (process.env.KREDITS_CONTRACT_ADDR) {
ENV.contractMetadata['Kredits'] = { address: process.env.KREDITS_CONTRACT_ADDR };
}
if (process.env.TOKEN_CONTRACT_ADDR) {
raucao (Migrated from github.com) commented 2017-05-12 15:46:19 +00:00

We use config files in Ember, so it's clear what is being built. Otherwise you end up with a build that completely hides where its config comes from.

Edit: loldidntread. Anyway, we shouldn't add even more env vars and use normal config options for all of them (as well as the addresses from the contracts module).

We use config files in Ember, so it's clear what is being built. Otherwise you end up with a build that completely hides where its config comes from. Edit: loldidntread. Anyway, we shouldn't add even more env vars and use normal config options for all of them (as well as the addresses from the contracts module).
bumi (Migrated from github.com) reviewed 2017-05-12 15:48:09 +00:00
@@ -41,0 +39,4 @@
if (process.env.KREDITS_CONTRACT_ADDR) {
ENV.contractMetadata['Kredits'] = { address: process.env.KREDITS_CONTRACT_ADDR };
}
if (process.env.TOKEN_CONTRACT_ADDR) {
bumi (Migrated from github.com) commented 2017-05-12 15:48:09 +00:00

I see. what is the best option to set local dev configuration options? (like for example here the contract addresses?)

I see. what is the best option to set local dev configuration options? (like for example here the contract addresses?)
raucao (Migrated from github.com) reviewed 2017-05-12 15:58:22 +00:00
@@ -41,0 +39,4 @@
if (process.env.KREDITS_CONTRACT_ADDR) {
ENV.contractMetadata['Kredits'] = { address: process.env.KREDITS_CONTRACT_ADDR };
}
if (process.env.TOKEN_CONTRACT_ADDR) {
raucao (Migrated from github.com) commented 2017-05-12 15:58:22 +00:00

I guess this works for now. Would be nice to use environment-specific configs soon.

I guess this works for now. Would be nice to use environment-specific configs soon.
bumi (Migrated from github.com) reviewed 2017-05-12 16:15:19 +00:00
@@ -41,0 +39,4 @@
if (process.env.KREDITS_CONTRACT_ADDR) {
ENV.contractMetadata['Kredits'] = { address: process.env.KREDITS_CONTRACT_ADDR };
}
if (process.env.TOKEN_CONTRACT_ADDR) {
bumi (Migrated from github.com) commented 2017-05-12 16:15:19 +00:00

yep. I only see those used for configs that must not be in the repo / only for the current machine.

so defaulting to parity.kosmos.org:8545 and this PR is ok?

yep. I only see those used for configs that must not be in the repo / only for the current machine. so defaulting to parity.kosmos.org:8545 and this PR is ok?
raucao (Migrated from github.com) reviewed 2017-05-12 16:35:44 +00:00
@@ -41,0 +39,4 @@
if (process.env.KREDITS_CONTRACT_ADDR) {
ENV.contractMetadata['Kredits'] = { address: process.env.KREDITS_CONTRACT_ADDR };
}
if (process.env.TOKEN_CONTRACT_ADDR) {
raucao (Migrated from github.com) commented 2017-05-12 16:35:44 +00:00

Yer.

Yer.
bumi commented 2017-05-12 17:06:33 +00:00 (Migrated from github.com)

rethought this PR. actually I'd like to have it configurable per session.
Does it make sense to check localstorage before using the global config?

rethought this PR. actually I'd like to have it configurable per session. Does it make sense to check localstorage before using the global config?
Sign in to join this conversation.