Can I play around with a safe network testnet?

What you saw there is just that you are mapping a network name to the location where actually the list of contacts is written when you switch to a network, and where the CLI/client reads them from to bootstrap to the network. Thus, you should never add a network name mapped to ~/.safe/node/node_connection_info.config since that’s overwritten with whichever network contact addresses you want to connect to.

If you want to have some contacts list in some file, for some local test you have, then you have to create another file and then add a network name mapping it to that other file, e.g.:

$ safe networks add my-local-net <some path>/my-local-node_connection_info.config

If you then switch to my-local-net, CLI will overwrite the ~/.safe/node/node_connection_info.config with the content of <some path>/my-local-node_connection_info.config. You can see the same happens if you switch to a network which is mapped to the S3 URL, it fetches it from the URL and writes that content onto ~/.safe/node/node_connection_info.config.

We could restrict CLI to not allow you to add a network mapped to ~/.safe/node/node_connection_info.config.

3 Likes