new: can choose between devnet and testnet
This commit is contained in:
parent
bbebd05ad6
commit
b9af0a4270
@ -1 +1,2 @@
|
|||||||
|
NETWORK=testnet
|
||||||
ADDRESS=WALLET1,WALLET2
|
ADDRESS=WALLET1,WALLET2
|
||||||
|
|||||||
@ -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.
|
Don't forget to put `,` between the wallets.
|
||||||
|
|
||||||
```env
|
```env
|
||||||
WALLET=wallet1,wallet2,etc
|
NETWORK={network}
|
||||||
|
WALLET={wallet1},{wallet2},{wallet3},...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NETWORK can be `devnet` or `testnet`.
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
### Run with go
|
### Run with go
|
||||||
|
|||||||
2
main.go
2
main.go
@ -29,7 +29,7 @@ func main() {
|
|||||||
|
|
||||||
func run(w string) {
|
func run(w string) {
|
||||||
for {
|
for {
|
||||||
url := "https://faucet.devnet.sui.io/gas"
|
url := "https://faucet." + strings.ToLower(os.Getenv("NETWORK")) + ".sui.io/gas"
|
||||||
|
|
||||||
request := `
|
request := `
|
||||||
{"FixedAmountRequest":{"recipient":"` + w + `"}}
|
{"FixedAmountRequest":{"recipient":"` + w + `"}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user