fuels-rs icon indicating copy to clipboard operation
fuels-rs copied to clipboard

Read testnet wallets' private keys from environment variables

Open digorithm opened this issue 2 years ago • 3 comments

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: https://github.com/FuelLabs/fuels-ts/pull/1858. We should generate a new test wallet, fund it through the faucet, and then set the env var on GitHub.

digorithm avatar Mar 12 '24 11:03 digorithm

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.

arboleya avatar Mar 12 '24 12:03 arboleya

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.

digorithm avatar Mar 12 '24 13:03 digorithm

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

Br1ght0ne avatar May 09 '24 12:05 Br1ght0ne

Should be fixed (env vars will be used) in #1471.

Br1ght0ne avatar Sep 02 '24 15:09 Br1ght0ne