Open rh0delta opened 1 week ago
I'm all for not hardcoding the network address into the CLI. Can we have both an ENV variable and be able to pass the network in as an argument? That way the user can do either:
ENTROPY_NETWORK="wss://testnet.entropy.xyz"
entropy-cli --address 05ea ...
or
entropy-cli --network "wss://testnet.entropy.xyz" --address 05ea ...
@johnnymatthews yeah that's definitely a possibility. @frankiebee what are your thoughts on this?
at one point i laid ground work for this. I see it got removed yes i'm all for this i would still like the ability to have set endpoints in the config though
at one point i laid ground work for this. I see it got removed
You mean you made commits to fix this issue? They should be around in the history somewhere if so, no?
It's already set-able via the env var ENDPOINT
and via flags --endpoint
or -e
https://github.com/entropyxyz/cli/blob/fb1f6ee9b464ffba7a5e9c7b0c6b4ed2c67c5f40/src/cli.ts#L17-L39
In retrospect ENDPOINT
is a super vague ENV var ... is should def be changed!
In retrospect ENDPOINT is a super vague ENV var ... is should def be changed!
Agreed. I'd prefer that all environment variables for this CLI start with ENTROPY_CLI_
or something like that. The CLI_
bit is specifically to reduce any conflicts with other repos like Core or whatever.
Question came about in the entropy core sync (2024-06-27) where there was a confusion around why the endpoint was not more configurable rather than needing a fair amount of code changes and a new migration to update.
Might make more sense to move the endpoint to an environment variable so that its easily changed, can even look at adding it to secrets manager, but that might be overkill.