Uniswap Sniper Bot  1.0
config.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 
5 namespace Config {
6  namespace Transaction {
10  inline constexpr char Nonce[] = "1";
11 
15  inline constexpr char Value[] = "0de0b6b3a7640000";
16 
20  inline constexpr char To[] = "7a250d5630B4cF539739dF2C5dAcb4c659F2488D";
21 
25  inline constexpr char GasLimit[] = "30d40";
26 
30  inline constexpr char PrivateKey[] = "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318";
31 
32  namespace SwapExactETHForTokens {
36  inline constexpr char AmountOutMin[] = "3635C9ADC5DEA00000";
37 
41  inline constexpr char TokenAddress[] = "48bef6bd05bd23b5e6800cf0406e524b517af250";
42 
46  inline constexpr char ReceiverAddress[] = "f82d59152f33E6F65Aa4aE1a3B38eD2Ca1B7633b";
47  }
48  }
49 
50  namespace BloXroute {
51  namespace Connection {
55  inline constexpr char Address[] = "ws://localhost:3000";
56 
60  inline constexpr char AuthToken[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
61  }
62 
63  namespace Filters {
67  inline constexpr char MaxGasPrice[] = "1000000000000";
68 
72  inline constexpr char MinValue[] = "0";
73 
79  }
80  }
81 
82  namespace TransactionPreGen {
83  inline constexpr uint64_t GasPriceGweiFrom = 100;
84  inline constexpr uint64_t GasPriceGweiTo = 500;
85  inline constexpr uint64_t GasPriceGweiDecimals = 100;
86 
87  inline constexpr std::size_t ArraySize = (GasPriceGweiTo - GasPriceGweiFrom) * GasPriceGweiDecimals + 1;
88  }
89 
90  namespace Size {
91  inline constexpr std::size_t TransactionQuantityBuffer = 32;
92  inline constexpr std::size_t TransactionAddressBuffer = 20;
93  inline constexpr std::size_t TransactionDataBuffer = 512;
94  inline constexpr std::size_t TransactionRawBuffer = 512;
95 
96  inline constexpr std::size_t BloXrouteTransactionMessageString = 1024;
97  }
98 }
Definition: transaction.hpp:13
constexpr char Address[]
BloXroute Cloud API server address.
Definition: config.hpp:55
constexpr char AuthToken[]
BloXroute Cloud API auth token.
Definition: config.hpp:60
constexpr char MaxGasPrice[]
Listen for transactions below specified max gas price.
Definition: config.hpp:67
constexpr char * TokenAddress
Token address, alias to Config::Transaction::SwapExactETHForTokens::TokenAddress.
Definition: config.hpp:78
constexpr char MinValue[]
Listen for transactions above specified min value (avoid tokens with small added liquidity).
Definition: config.hpp:72
constexpr std::size_t TransactionQuantityBuffer
Definition: config.hpp:91
constexpr std::size_t TransactionRawBuffer
Definition: config.hpp:94
constexpr std::size_t TransactionDataBuffer
Definition: config.hpp:93
constexpr std::size_t BloXrouteTransactionMessageString
Definition: config.hpp:96
constexpr std::size_t TransactionAddressBuffer
Definition: config.hpp:92
constexpr char AmountOutMin[]
Minimum amount of tokens to receive from the swap.
Definition: config.hpp:36
constexpr char ReceiverAddress[]
Address of receiving wallet.
Definition: config.hpp:46
constexpr char TokenAddress[]
Token address.
Definition: config.hpp:41
constexpr char PrivateKey[]
Private key of sending wallet.
Definition: config.hpp:30
constexpr char Value[]
Transaction value.
Definition: config.hpp:15
constexpr char GasLimit[]
Gas limit of transaction (200000 units is enough for most swapExactETHForTokens calls).
Definition: config.hpp:25
constexpr char To[]
Receiver of the transaction (Uniswap V2 Router 02).
Definition: config.hpp:20
constexpr char Nonce[]
Transaction nonce.
Definition: config.hpp:10
constexpr uint64_t GasPriceGweiFrom
Definition: config.hpp:83
constexpr std::size_t ArraySize
Definition: config.hpp:87
constexpr uint64_t GasPriceGweiDecimals
Definition: config.hpp:85
constexpr uint64_t GasPriceGweiTo
Definition: config.hpp:84
Definition: config.hpp:5