2.2.14 • Published 8 months ago

@latticexyz/faucet v2.2.14

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

A minimal Typescript faucet to drip native tokens on Ethereum chains

Usage

  1. Specify the environment variables. Note that you need to export these variables for the faucet service to get them.

    VariableDescriptionDefault
    HOSTHost that the indexer server listens on0.0.0.0
    PORTPort that the indexer server listens on3002
    RPC_HTTP_URL1HTTP URL for Ethereum RPC
    FAUCET_PRIVATE_KEYPrivate key of wallet to distribute faucet funds from
    DRIP_AMOUNT_ETHERDrip amount in ether

    (1) If you use http://localhost:8545 and it fails try using http://127.0.0.1:8545 instead

  2. Start the server.

    npx @latticexyz/faucet

    For example, you can use these values to drip 1 ETH for a local anvil instance:

    VariableValueComments
    RPC_HTTP_URLhttp://127.0.0.1:8545localhost sometimes doesn't work
    FAUCET_PRIVATE_KEY0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690dOne of the default accounts
    DRIP_AMOUNT_ETHER1

Getting ETH from a faucet

This sample program shows how to obtain ETH from a faucet using TypeScript.

Alternatively, you can submit a POST request to the faucet. For example, if you use the default HOST and PORT, this command requests a drip to the zero address.

curl -X POST http://127.0.0.1:3002/trpc/drip \
   -H "Content-Type: application/json" \
   -d '{"address": "0x0000000000000000000000000000000000000000"}'
2.2.14

9 months ago

2.2.13

9 months ago

2.2.12

9 months ago

2.2.11

9 months ago

2.2.10

10 months ago

2.2.9

10 months ago

2.2.8

10 months ago

2.2.5

10 months ago

2.2.4

10 months ago

2.2.7

10 months ago

2.2.6

10 months ago

2.2.3

10 months ago

2.2.2

10 months ago

2.2.1

10 months ago

2.2.0

11 months ago

2.1.1

11 months ago

2.0.12

1 year ago

2.1.0

11 months ago

2.0.11

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.4

1 year ago

2.0.0-next.18

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

2.0.0-next.17

1 year ago

2.0.0-next.16

1 year ago

2.0.0-next.15

2 years ago

2.0.0-next.9

2 years ago

2.0.0-next.10

2 years ago

2.0.0-next.11

2 years ago

2.0.0-next.12

2 years ago

2.0.0-next.13

2 years ago

2.0.0-next.14

2 years ago

0.0.8

4 years ago

0.0.7

4 years ago