Skip to content

awixor/eth-tip-jar-hardhat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ETH Tip Jar

A Solidity smart contract built with Hardhat 3 that allows users to send tips in ETH with optional messages.

Project Overview

This project is a Hardhat 3 project using the native Node.js test runner (node:test) and the viem library for Ethereum interactions.

Features:

  • A simple TipJar smart contract for receiving tips
  • Owner-based withdrawal functionality
  • Event logging for all tip transactions
  • Comprehensive test suite using node:test and viem
  • Deployed on Sepolia testnet

Deployment

Contract Address (Sepolia): 0x0e54a8B9ce9644AE19cc69A2372305Fa9C3b3821

Usage

Running Tests

To run all the tests in the project, execute the following command:

npx hardhat test

You can also selectively run the Solidity or node:test tests:

npx hardhat test solidity
npx hardhat test nodejs

Deploying to Sepolia

To deploy to Sepolia, you need an account with funds. The Hardhat configuration includes a SEPOLIA_PRIVATE_KEY configuration variable.

Set the private key using hardhat-keystore:

npx hardhat keystore set SEPOLIA_PRIVATE_KEY

Then deploy:

npx hardhat ignition deploy --network sepolia ignition/modules/TipJar.ts

About

Smart contract backend for the Tip Jar DApp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors