Skip to content

Instantly share code, notes, and snippets.

View jzgdev's full-sized avatar

jzgdev

View GitHub Profile
// This is a basic uniswap frontrunning MEV bot
// Made by Merunas follow me on youtube to see how to use it and edit it: https://www.youtube.com/channel/UCJInIwgW1duAEnMHHxDK7XQ
// 1. Setup ethers, required variables, contracts and start function
const { Wallet, ethers } = require('ethers')
const { FlashbotsBundleProvider, FlashbotsBundleResolution } = require('@flashbots/ethers-provider-bundle')
// 1.1 Setup ABIs and Bytecodes
const UniswapAbi = [{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesire
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTCollectible is ERC721Enumerable, Ownable {
@shazow
shazow / flashbotnfts.ts
Last active May 26, 2023 01:20
WIP: Flashbot NFTs
import { BigNumber, providers, Wallet } from "https://esm.sh/ethers";
import { FlashbotsBundleProvider, FlashbotsBundleResolution } from "https://esm.sh/@flashbots/ethers-provider-bundle";
const FLASHBOTS_AUTH_KEY = Deno.env.get('FLASHBOTS_AUTH_KEY');
const WALLET_PRIVATE_KEY = Deno.env.get('WALLET_PRIVATE_KEY');
const GWEI = BigNumber.from(10).pow(9);
const PRIORITY_FEE = GWEI.mul(3);
const LEGACY_GAS_PRICE = GWEI.mul(12);
const BLOCKS_IN_THE_FUTURE = 2;
@bonbombs
bonbombs / customFields.json
Last active January 30, 2023 19:44
custom streamlabs follower goal widget
{
"font_type": {
"label": "Font",
"type": "fontpicker",
"value": "Fredoka One"
},
"barBackground": {
"label": "BG Color",
"type": "colorpicker",
"value": "#43342e"
@chrisjensen
chrisjensen / progress.html
Last active April 12, 2022 06:40
Raisely Progress Bar in Streamlabs
<div class="progress-bar progress-bar--size-large progress-bar--style-rounded">
<div class="progress-bar__progress">
<span class="progress-bar__total">0</span>
<span class="progress-bar__goal">0</span>
<span class="progress-bar__bar progress-bar__bar--animated">
<span class="progress-bar__total">0</span>
<span class="progress-bar__goal">0</span>
</span>
</div>
</div>
@jzgdev
jzgdev / HDRI_Link_makePack
Last active April 30, 2018 19:16
Script to create packs for GSG's HDRI Link (Uses ImageMagick, if you don't have it already run `brew install imagemagick`). Navigate to a directory of image files and copy and paste this script. Navigate to the "Packs" folder you use for HDRI Link and rename the folder with the next number in the sequence + whatever name you'd like (i.e. '10_MyH…
@willwarren89
willwarren89 / MyERC20.sol
Created March 26, 2017 01:31
ERC20 token with metadata and initial stakeholder allocations.
pragma solidity ^0.4.10;
contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}