Code Monkey home page Code Monkey logo

eth_transactions_smart_contract's Introduction

Sample Hardhat Project

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a Hardhat Ignition module that deploys that contract.

Try running some of the following tasks:

npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat ignition deploy ./ignition/modules/Lock.js

Transactions Contract

This is a simple Ethereum smart contract written in Solidity that allows for the tracking of transactions on the blockchain.

Contract Details

The Transactions contract keeps track of transactions, each represented by a TransferStruct which includes the sender, receiver, amount, message, timestamp, and a keyword.

Functions

  • addToBlockchain(address payable receiver, uint amount, string memory message, string memory keyword): This function allows a user to add a transaction to the blockchain. It emits a Transfer event and increments the transactionCount.

  • getAllTransactions(): This function returns all transactions that have been added to the blockchain.

  • getTransactionCount(): This function returns the total number of transactions that have been added to the blockchain.

Setup

To compile the contract, use the Solidity compiler with a version of 0.8.0 or higher.

Usage

To interact with the contract, you can use a web3 provider like Metamask and a frontend JavaScript library like ethers.js or web3.js.

License

This project is unlicensed.

eth_transactions_smart_contract's People

Contributors

polgasull avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.