keep-core icon indicating copy to clipboard operation
keep-core copied to clipboard

Generalise networks types handling in the client

Open nkuba opened this issue 3 years ago • 0 comments

We could try to improve the network type for running the client handling to be more flexible and generic as @dimpar suggested in https://github.com/keep-network/keep-core/pull/3200#issuecomment-1228500881.

Some general thoughts about this approach.. What is kind of itchy is that we couple concrete networks into our codebase. Imagine we would do that a couple of months ago when testing on Ropsten, it's gone now. Same with other testing networks. My point is that it might happen to Goerli as well and then we would need to clean this code. Even if we add or remove a network then we need to change code at least in a couple of places (which I guess is not the end of the world, but some additional thing to remember about). I'm not 100% sure what would be the optimal approach here yet, maybe coding against some abstract networks that support default peers and networks that do not. These networks list might live in a config file with their respective chain ids. Or some other solution with a "one stop for networks list" and code against that list.

nkuba avatar Aug 29 '22 07:08 nkuba