FAUCET DEVELOPMENT HAS MOVED - Please see this repo where all future development will take place
This software provides Ethereum compatible blockchain tokens; think of this as a "Faucet as a Service".
It provides a web page interface (where users can paste in their public key).
It also provides an RPC endpoint (which can be called manually or programatically).
This software has specific rate limiting built in.
Just as with settings like token_amount_in_wei, blockchain_rpc, blockchain_chain_id and so forth, the aforementioned rate limiting (user_rate_limit & rate_limit_duration is completely configurable i.e. one token per hour or 10 tokens per day etc.
At present blockchain faucets are prone to being spammed; even in cases where the blockchain tokens are not worth much. This spamming overloads the faucet hosting and also dries up faucet supply. This makes it hard for legitimate smart contract developers etc. to obtain free tokens.
This node application allows users to paste in their Ethereum compatible address (future version will accept a link to a social media post with address also).
This application transfers the blockchain token from the faucet to the user's account.
Future versions of this application will optionally collect some information (as per social media's public APIs) about the user i.e. when their account was created, etc in order to determine if the users are legitimate or just bots. Like everything else this will also be configurable.
A lot of parameters will be configurable. This is good for security (separate config file) and also allows this code to be reused for other projects. Configurations will eventially include:
- faucet_private_key
- faucet_public_key
- blockchain_rpc
- blockchain_chain_id
- hash_tags_to_check
- collect_api_data
- user_rate_limit
- rate_limit_duration
- token_amount_in_wei
- blockchain_logo_url
- blockchain_name
- blockchain_description
- blockchain_block_explorer_url
- blockchain_block_explorer_address_url
- blockchain_block_explorer_transaction_url
git clone https://github.com/second-state/faucet-with-social-media-authentication.git
Configure the application by editing config.env
Change directories
cd faucet-with-social-media-authentication
npm install
npm run prod
Users will visit the site and paste in their public key
Users can also use requests to perform the same task. For example the following HTTP Post request can be used (where 0xF9A8917c7fFb04822daDC861E9e66E69cecCD248 is the users public key).
curl --location --request POST 'http://localhost:8001/api/0xF9A8917c7fFb04822daDC861E9e66E69cecCD248'
The faucet uses rate limiting which will return the 429 Too Many Requests response code; if rate is exceeded. For web users the following static page will be shown as the visual response (still technically a 429 response with a static page attached)

