Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read testnet wallets' private keys from environment variables #1297

Open
digorithm opened this issue Mar 12, 2024 · 3 comments
Open

Read testnet wallets' private keys from environment variables #1297

digorithm opened this issue Mar 12, 2024 · 3 comments
Labels
ci GitHub CI build/pipeline P0 Critical priority

Comments

@digorithm
Copy link
Member

digorithm commented Mar 12, 2024

To avoid leaking testnet wallets' private keys, we shouldn't hardcode these wallets' private keys like we do, e.g., in here:

https://github.com/FuelLabs/fuels-rs/blob/master/packages/fuels/tests/providers.rs#L597

Instead, we should read these private keys from environment variables and set them in the GitHub CI environment. Similar to what was done recently on the TS SDK: FuelLabs/fuels-ts#1858. We should generate a new test wallet, fund it through the faucet, and then set the env var on GitHub.

@digorithm digorithm added ci GitHub CI build/pipeline P0 Critical priority labels Mar 12, 2024
@arboleya
Copy link
Member

Maybe not relevant here, but as we also had references to WALLET_ADDRESS, we started reading it from the environment/secrets as well. If we need to change things in the future, no code modifications will be necessary.

@digorithm
Copy link
Member Author

Maybe not relevant here, but as we also had references to WALLET_ADDRESS, we started reading it from the environment/secrets as well. If we need to change things in the future, no code modifications will be necessary.

💯 we should do the same here.

@Br1ght0ne
Copy link
Member

The linked test was removed in #1245. We'll need to use envvars next time we add a test like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci GitHub CI build/pipeline P0 Critical priority
Projects
None yet
Development

No branches or pull requests

3 participants