Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config - contract addresses (in code) #18

Open
AnthonyAkentiev opened this issue Nov 20, 2017 · 0 comments
Open

Config - contract addresses (in code) #18

AnthonyAkentiev opened this issue Nov 20, 2017 · 0 comments
Assignees
Milestone

Comments

@AnthonyAkentiev
Copy link
Member

AnthonyAkentiev commented Nov 20, 2017

Config

  1. Please add some json or config file to code.
  2. Code should automatically select CORRECT network (current) from MetaMask.
    Write some wrapper please.

Example:

// JSON:
main_contract_address: {
  mainnet: '0x00BDb5699745f5b860228c8f939ABF1b9Ae374eD',
  rinkeby: '0x1522900B6daFac587d499a862861C0869Be6E428'
},

// Usage example:
a = config.getAddress('main_contract_address')
...

Autodetection

  1. DApp should autodetect MetaMask network and use it.
  2. If current network is not supported -> "Current Ethereum network is not supported. Please use Kovan or Rinkeby testnets"
@AnthonyAkentiev AnthonyAkentiev added this to the Milestone 1 milestone Nov 20, 2017
@AnthonyAkentiev AnthonyAkentiev changed the title Settings - contract addresses (in code) Config - contract addresses (in code) Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants