new: can choose between devnet and testnet

This commit is contained in:
upong 2023-04-04 11:13:36 +02:00
parent bbebd05ad6
commit b9af0a4270
3 changed files with 6 additions and 2 deletions

View File

@ -1 +1,2 @@
NETWORK=testnet
ADDRESS=WALLET1,WALLET2

View File

@ -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

View File

@ -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 + `"}}