pendulum-chain / pendulum-webapp

Repository for the testnet prototype of the Pendulum web application
GNU General Public License v3.0
1 stars 0 forks source link

Show menu to select which node to connect to #51

Closed gonzamontiel closed 2 years ago

gonzamontiel commented 2 years ago

Motivation Since we are planning to have a self-hosted Rococo testnet and also connect to the live Rococo chain, it comes in handy to select the node to connect to. In addition, for general purposes, this is a nice feature to have.

Tasks

ebma commented 2 years ago

We probably also need to offer something to enter a custom AMM address since the address of the deployed on-chain contract also varies for every node.

gonzamontiel commented 2 years ago

While I agree that this could be more flexible, I think it should be a privileged operation (if not, anyone could just break it), and so far we can't handle different permissions. Considering that if we don't re-deploy any of the nodes, then the AMM address on each will remain the same, we can handle it by having two different addresses by config. Would that be enough?

gonzamontiel commented 2 years ago

I am thinking of something like:

"node1": {
    "wss_endpoint": "...",
    "amm_address": "..."
},
"node2": {
    "wss_endpoint": "...",
    "amm_address": "..."
}