paramsiddharth / web3-transactions

Random transactions, to-and-fro the self and a peer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web3 - Random Transactions

Random transactions, to-and-fro the self and a peer.

Instructions

Start by setting up a local, and preferably persistent, Ethereum blockchain.

npm ci
npx ganache -v -d --database.dbPath ./blk -i 344 -a 25

Choose from the output and add the relevant variables to a .env file in the root.

# Required
WEB3_SELF_ADDRESS="<your-address>"
WEB3_SELF_KEY="<your-private-key>"

WEB3_PEER_ADDRESS="<another-address>"
WEB3_PEER_KEY="<their-private-key>"

# Optional
WEB3_PROVIDER="<ethereum-provider>"

Following are the instructions to run the application with different frameworks.

Web3.js

Web3.js is an Ethereum client for JavaScript.

npx ts-node index.ts

Web3.py

Web3.py is an Ethereum client for Python.

python -m venv env
. ./env/bin/activate
pip install -r requirements.txt
python app.py

Web3j

Web3j is an Ethereum client for Java.

cd java/Web3Transactions
sdk env
mvn clean install
mvn package
java -jar target/Web3Transactions-1.0-SNAPSHOT-jar-with-dependencies.jar

Go-Ethereum

Go-Ethereum is an Ethereum client for Go.

go mod download
go run .

Rust-Web3

Rust-Web3 is an Ethereum client for Rust.

cd rust
cargo run

Made with ❤ by Param.

About

Random transactions, to-and-fro the self and a peer.


Languages

Language:Java 27.1%Language:Go 21.5%Language:Rust 20.8%Language:TypeScript 16.4%Language:Python 13.6%Language:Shell 0.5%