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

React Frontend doesn't load development network contracts. #135

Open
Canalytic opened this issue Oct 10, 2019 · 1 comment
Open

React Frontend doesn't load development network contracts. #135

Canalytic opened this issue Oct 10, 2019 · 1 comment

Comments

@Canalytic
Copy link

Follow readme.md to

- create subgraph

- run truffle tests to populate graph and update contract address

- run subgraph

- run frontend

Frontend loads successfully but loads mainnet contracts. Then tried to edit the frontend/.env file for local host, ensuring that the:

moloch.address 0xf25186B5081Ff5cE73482AD761DB0eB0d25abfBF
simpleToken.address 0x345cA3e014Aaf5dcA488057592ee47305D9B3e10
guildBank.address 0xB9462EF3441346dBc6E49236Edbb0dF207db09B7

NODE_PATH=src REACT_APP_MOLOCH_ADDRESS=0xf25186B5081Ff5cE73482AD761DB0eB0d25abfBF REACT_APP_GUILD_BANK_ADDRESS=0xB9462EF3441346dBc6E49236Edbb0dF207db09B7 REACT_APP_ETH_URL=http://localhost:8545 REACT_APP_TOKEN_ADDRESS=0x345cA3e014Aaf5dcA488057592ee47305D9B3e10 REACT_APP_MEDIANIZER_ADDRESS=0x729D19f657BD0614b4985Cf1D82531c67569197B REACT_APP_GRAPH_NODE_URI=http://127.0.0.1:8000/subgraphs/name/moloch

are populated in the file, but this breaks the frontend

Screen Shot 2019-10-10 at 1 40 53 AM

I think that starting ganache differently might solve the problem but haven't found solution yet.
ganache-cli -h 0.0.0.0 -m \"fetch local valve black attend double eye excitplanet primary install allow\" -a 100

Or alternatively if anyone knows how to find the correct REACT_APP_MEDIANIZER_ADDRESS local development.

@rhlsthrm
Copy link
Contributor

Hey @Canalytic, you will have to deploy your own medianizer contract if you want to do this. Alternatively, you could do something like REACT_APP_MEDIANIZER_ADDRESS=0x0 and check in the app if it's set to 0x0 and if so, hardcode it.

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