backend-replacement icon indicating copy to clipboard operation
backend-replacement copied to clipboard

Support testnet

Open freeatnet opened this issue 7 years ago • 5 comments

A developer should be able to stand up an instance of the backend that allows them to test a backend client with transactions done on testnet.

freeatnet avatar Mar 05 '18 18:03 freeatnet

I'd like to test my instance on a local testchain. How to do it?

icinsight avatar Mar 18 '19 03:03 icinsight

@icinsight

  1. Deploy the trading contract
  2. Deploy some tokens
  3. Set the trading contract address for the backend to look at
  4. Set your devchain node's HTTP and WS endpoints

That should be enough to get you started. Let me know if you encounter any difficulties.

freeatnet avatar Mar 18 '19 07:03 freeatnet

Thanks, very helpful. I'm familiar with these configs by trial and error, but thanks for confirming.

Can you comment on lines 30-37:

ED_WS_SERVERS = [ "wss://socket01.etherdelta.com/socket.io/?EIO=3&transport=websocket", "wss://socket02.etherdelta.com/socket.io/?EIO=3&transport=websocket", "wss://socket03.etherdelta.com/socket.io/?EIO=3&transport=websocket", "wss://socket04.etherdelta.com/socket.io/?EIO=3&transport=websocket", "wss://socket05.etherdelta.com/socket.io/?EIO=3&transport=websocket", "wss://socket06.etherdelta.com/socket.io/?EIO=3&transport=websocket", ]

Shoud I have my own wss service on and configured? Obviously, etherdelta.com is not happy to serve my project with their service ;-)

icinsight avatar Mar 18 '19 16:03 icinsight

Also, what about the config file? https://forkdelta.app/config/main.json

icinsight avatar Mar 18 '19 16:03 icinsight

@icinsight Re: ED_WS_SERVERS: those addresses refer to mainnet EtherDelta API. You can disable etherdelta_observer altogether, in fact, if you don't need to pull ED orderbooks.

Re: frontend config: you'll need to point to your testnet server install, update the contract address, and replace token list with your testnet's tokens. Something like this (this is outdated): https://github.com/forkdelta/classic-frontend/blob/master/config/testnet.json

freeatnet avatar Apr 26 '19 18:04 freeatnet