diff --git a/.env.example b/.env.example index 19bd362..77cf581 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,2 @@ +NETWORK=testnet ADDRESS=WALLET1,WALLET2 diff --git a/README.md b/README.md index e81ecef..118b193 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,12 @@ Copy the `.env.example` file and rename it to `.env`. Fill the variables with yo Don't forget to put `,` between the wallets. ```env -WALLET=wallet1,wallet2,etc +NETWORK={network} +WALLET={wallet1},{wallet2},{wallet3},... ``` +NETWORK can be `devnet` or `testnet`. + ## Run ### Run with go diff --git a/main.go b/main.go index 0c1d4bb..0f832a2 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ func main() { func run(w string) { for { - url := "https://faucet.devnet.sui.io/gas" + url := "https://faucet." + strings.ToLower(os.Getenv("NETWORK")) + ".sui.io/gas" request := ` {"FixedAmountRequest":{"recipient":"` + w + `"}}