How to Create a Custom "faucet" Command With Hardhat

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • hardhat

    Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.

  • // hardhat.config.ts import * as dotenv from 'dotenv'; import { HardhatUserConfig, task } from 'hardhat/config'; import '@nomiclabs/hardhat-etherscan'; import '@nomiclabs/hardhat-waffle'; import '@typechain/hardhat'; import 'hardhat-gas-reporter'; import 'solidity-coverage'; import '@nomiclabs/hardhat-ethers'; // Tasks import './tasks/faucet.ts'; // <--IMPORTED FAUCET TASK dotenv.config(); // This is a sample Hardhat task. To learn how to create your own go to // https://hardhat.org/guides/create-task.html task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => { const accounts = await hre.ethers.getSigners(); for (const account of accounts) { console.log(account.address); } }); // You need to export an object to set up your config // Go to https://hardhat.org/config/ to learn more const config: HardhatUserConfig = { solidity: { version: '0.8.4', }, networks: { hardhat: { chainId: 1337, }, ropsten: { url: process.env.ROPSTEN_URL || '', accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], }, }, gasReporter: { enabled: process.env.REPORT_GAS !== undefined, currency: 'USD', }, etherscan: { apiKey: process.env.ETHERSCAN_API_KEY, }, }; export default config;

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts