Access to testnet tokens is a crucial yet challenging aspect for Web3 developers, especially newcomers. During a hackathon where I mentored, many participants (about 50% new to Web3) struggled to find reliable sources for these tokens. I directed them to Alchemy, only to discover that Alchemy's faucet was token-gated, creating an unnecessary barrier. This frustration highlighted a significant issue: the need for a simplified, accessible way to obtain testnet tokens while also preventing faucet abuse.
To address this, I created the Based Faucet Suite, a comprehensive solution designed to streamline access to testnet tokens. Here's how it works:
Farcaster Faucet Bot: Allows users to request tokens directly on Farcaster by casting
@faucetbot Base
. This bot supports networks like Arbitrum, Base, and Mode.Based Frame: Provides a secure interface to get up to 0.02 ETH on Base Sepolia for users with a Talent Builder Score above 20, preventing bots from draining the faucet.
TG Mini App: A Telegram Mini App that offers a user-friendly interface for accessing up to 0.02 ETH on Base Sepolia with similar security measures.
Based Aggregator: Lists all active faucets with details such as last active time, remaining ETH, requirements, and daily supply, making it easy for developers to find available resources.
Smart Contract Repository: Contains all the smart contracts used in the suite, providing transparency and encouraging community contributions.
The Based Faucet Suite addresses the critical issue of testnet token accessibility by offering a streamlined, secure, and user-friendly solution. This project not only simplifies the process for developers but also enhances their ability to experiment and build on the blockchain, ultimately fostering innovation in the Web3 space.
While building this project, I faced several challenges that required creative solutions and persistence:
Obtaining Historical Data: I encountered difficulties in fetching historical data for the last active time using the Alchemy SDK. The SDK proved challenging to use effectively for this purpose, so I resorted to making RPC calls to retrieve the necessary data.
Creating the TG Mini App: Integrating the Wallet into the TG Mini App posed significant challenges. I encountered numerous errors during the integration process but ultimately succeeded by implementing Rainbow Kit, which resolved the issues.
Preventing Faucet Abuse: Ensuring the security and integrity of the testnet faucets was a major concern. I addressed this by adding a Talent Builder Score requirement to screen out fake builders, ensuring that only genuine developers could access the resources.
Sustainability: Maintaining the sustainability of the faucets was one of the hardest tasks. Many faucets had become inactive due to running out of funds. To tackle this, I implemented a system that gives shoutouts and kudos to contributors who fund the faucet, promoting a sense of community and encouraging ongoing support.
Typescript Error with Viem: I encountered a persistent Typescript error when trying to port wallet clients into a custom utility function. This issue took a considerable amount of time to resolve, which I ultimately did by creating custom types.
useBackButton Hook in TG Mini App SDK: Another challenge was using the useBackButton hook from the TG Mini App SDK, which involved Server Side Rendering (SSR). I initially tried to call it in a client component, leading to issues. The problem was resolved by removing the SSR and importing the component dynamically.
Despite these challenges, each hurdle provided valuable learning experiences and opportunities to enhance the robustness and functionality of the Based Faucet Suite.
Tracks Applied (1)
SOCIAL with Farcaster
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
Discussion