
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
@latticexyz/faucet
Advanced tools
A minimal Typescript faucet to drip native tokens on Ethereum chains
Specify the environment variables.
Note that you need to export
these variables for the faucet service to get them.
Variable | Description | Default |
---|---|---|
HOST | Host that the indexer server listens on | 0.0.0.0 |
PORT | Port that the indexer server listens on | 3002 |
RPC_HTTP_URL 1 | HTTP URL for Ethereum RPC | |
FAUCET_PRIVATE_KEY | Private key of wallet to distribute faucet funds from | |
DRIP_AMOUNT_ETHER | Drip amount in ether |
(1) If you use http://localhost:8545
and it fails try using http://127.0.0.1:8545
instead
Start the server.
npx @latticexyz/faucet
For example, you can use these values to drip 1 ETH for a local anvil
instance:
Variable | Value | Comments |
---|---|---|
RPC_HTTP_URL | http://127.0.0.1:8545 | localhost sometimes doesn't work |
FAUCET_PRIVATE_KEY | 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d | One of the default accounts |
DRIP_AMOUNT_ETHER | 1 |
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"}'
FAQs
Faucet API for Lattice testnet
The npm package @latticexyz/faucet receives a total of 1,332 weekly downloads. As such, @latticexyz/faucet popularity was classified as popular.
We found that @latticexyz/faucet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.