Skip to content

Instantly share code, notes, and snippets.

View taarushv's full-sized avatar

Taarush Vemulapalli taarushv

View GitHub Profile
@taarushv
taarushv / mev.js
Last active January 26, 2024 09:16
Analyzing backrun/rebate in txs 0/1/2 in https://etherscan.io/block/17358588
// TX 1 - Admin wallet enables trading on FCKIT token https://etherscan.io/tx/0x12b949cf5605bb4da83efd14b6d38ad628a9ebf3befb42141d2ddb8cfc43d53e
// TX 2 - Searcher uses a proxy contract to buy ~2B FCKIT --for 60 ETH-- into multiple wallets (and to pay builder for gas fees/rebate) https://etherscan.io/tx/0xc3a37580a96b52a718a5b516dfef209f150e87a75032c725536821ea0d6cc875
// TX 3 - Rebate is forwarded from the flashbots builder back to the user https://etherscan.io/tx/0x80dc2721d833cd221bdf9264f1138a88907f57303bc606f8ee4034297201e095
const { ethers } = require('ethers'); // v5
const rpc = "https://mainnet.infura.io/v3/YOUR_API_KEY_HERE"
const provider = new ethers.providers.JsonRpcProvider(rpc)
// uni v2 router, to fetch trades using logs
const uniPool ="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
@taarushv
taarushv / createWallets.js
Last active June 26, 2022 02:52
Script to generate 'n' ethereum wallets (address + private key) and store it in a JSON. keysDB.json is the example output.
// Init web3 and configure to a node (alternatively to infura/ganache-cli)
var Web3 = require('web3')
var web3 = new Web3('http://127.0.0.1:8545')
// Setup lowdb to store
const low = require('lowdb')
const FileSync = require('lowdb/adapters/FileSync')
const adapter = new FileSync('keysDB.json')
const db = low(adapter)
db.defaults({ keys: [], count: 0 }).write()
pragma solidity ^0.4.23;
pragma experimental ABIEncoderV2;
contract MyCoinHome {
mapping(string => bool) private restrictedUsernames;
mapping(string=> string) usernameToIpfsHash;
mapping(string=>address) usernameToOwner;
mapping(address=> string) ownerToUsername;
mapping(string => bool) private usernameToAllowSale;
pragma solidity ^0.5.0;
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
@taarushv
taarushv / BulkWalletGenerator.js
Created May 9, 2019 11:47
Function to create 'n' number of ethereum wallets, distribute 'x' amount of ether to each of them, and export wallet as QR
var Tx = require('ethereumjs-tx')
const Web3 = require('web3')
var QRCode = require('qrcode')
const low = require('lowdb')
const FileSync = require('lowdb/adapters/FileSync')
const adapter = new FileSync('db.json')
const db = low(adapter)
var fs = require('fs')
// Web3 configured to Ropsten test network
Skip to content Search or jump to… Pull requests Issues Marketplace Explore @ezhost Sign out Learn Git and GitHub without any code! Using the Hello World guide, you’ll create a repository, start a branch, write comments, and open a pull request. Our new Terms of Service and Privacy Statement are in effect. Repositories Find a repository… ezhost / ezhost.github.io Browse activity Discover interesting projects and people to populate your personal news feed. Your news feed helps you keep up with recent activity on repositories you watch and people you follow. © 2018 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About Press h to open a hovercard with more details.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem sIpsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.