This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Import everything | |
| import { Wallet, BigNumber, ethers, providers } from 'ethers' | |
| const { FlashbotsBundleProvider, FlashbotsBundleResolution } = require('@flashbots/ethers-provider-bundle') | |
| /* | |
| Mainnet | |
| const provider = new providers.JsonRpcProvider('https://eth-mainnet.g.alchemy.com/v2/cmHEQqWnoliAP0lgTieeUtwHi0KxEOlh') | |
| const wsProvider = new providers.WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/cmHEQqWnoliAP0lgTieeUtwHi0KxEOlh') | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import SystemConfiguration.CaptiveNetwork | |
| func getWiFiSsid() -> String? { | |
| var ssid: String? | |
| if let interfaces = CNCopySupportedInterfaces() as NSArray? { | |
| for interface in interfaces { | |
| if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? { | |
| ssid = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String | |
| break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ifaddrs.h> | |
| // http://stackoverflow.com/questions/25626117/how-to-get-ip-address-in-swift | |
| func getIFAddresses() -> [String] { | |
| var addresses = [String]() | |
| // Get list of all interfaces on the local machine: | |
| var ifaddr : UnsafeMutablePointer<ifaddrs> = nil | |
| if getifaddrs(&ifaddr) == 0 { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ScaleToFitWidthHeightTransform implements Transformation { | |
| private int mSize; | |
| private boolean isHeightScale; | |
| public ScaleToFitWidthHeightTransform(int size, boolean isHeightScale){ | |
| mSize =size; | |
| this.isHeightScale = isHeightScale; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE States ( | |
| Id int IDENTITY(1,1) NOT NULL, | |
| Name varchar(40) NOT NULL, | |
| Abbreviation varchar(2) NOT NULL, | |
| CountryId int NOT NULL, | |
| CONSTRAINT [PK_States] PRIMARY KEY CLUSTERED ([Id] ASC), | |
| CONSTRAINT [uc_States_Abbreviation] UNIQUE NONCLUSTERED ([Abbreviation] ASC) | |
| ); | |
| SET IDENTITY_INSERT States ON |