ChainMovers / suibase

Sui development environment and cookbook.
https://suibase.io
Apache License 2.0
35 stars 6 forks source link

Add faucet feature #15

Closed mario4tier closed 1 year ago

mario4tier commented 1 year ago

Investigate. If implemented, should be configurable through sui-base.yaml:

https://forums.sui.io/t/running-local-gas-faucet-url/25773/4

FrankC01 commented 1 year ago

Observation notes:

mario4tier commented 1 year ago

Did implement with sui-faucet (so we can keep control on the genesis of the network for also supporting pre-funding).

The faucet has its own client/keystore in ~/sui-base/workdirs/localnet/faucet (does not interfere with the user config).

Handy commands implemented:

$ localnet faucet <address> ...  <--- one or more address can be specified
$ localnet faucet all       <-- Send coins to every addresses in the user sui.keystore
$ localnet faucet     <--- faucet balance, address, IP:port etc...

sui-base.yaml:

sui_faucet_enabled: true
sui_faucet_genesis_funding: 800000000000
sui_faucet_host_ip: "0.0.0.0"
sui_faucet_port: 9123
sui_faucet_max_request_per_second: 100
sui_faucet_num_coins: 5
sui_faucet_coin_value: 200000000
sui_faucet_request_buffer_size: 200
sui_faucet_client_timeout_secs: 10