├── README.md ├── bep20.json ├── f_config.json ├── followAddresss.js └── swap_abi.js /README.md: -------------------------------------------------------------------------------- 1 | # follow_swap_address 2 | 3 | 1: https://www.blocknative.com/ 申请apikey 免费用户每天1000次获取交易机会足够用了 4 | 2: npm install web3@1.8.0 5 | 3: npm install bnc-sdk 6 | 4 f_config.json 配置文件说明 7 | (1) rpc : 选择以太坊RPC 8 | (2) apikey : 步骤一中申请的APIKEY 9 | (3) followAddress : 要跟单的地址 10 | (4) Purchase proportion : 跟单地址买入 金额 你的比例 0.5为跟单地址百分之50的金额 0.6为百分之60 以此类推 11 | (5) Slippage :滑点 你跟踪地址买入金额如果池子小 你可能会失败 滑点自己调大 12 | (6) myaddress : 自己地址 13 | (7) private : 自己私钥 14 | 15 | 仅供测试学习使用 16 | 17 | 18 | -------------------------------------------------------------------------------- /bep20.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "constant": true, 4 | "inputs": [], 5 | "name": "name", 6 | "outputs": [ 7 | { 8 | "name": "", 9 | "type": "string" 10 | } 11 | ], 12 | "payable": false, 13 | "stateMutability": "view", 14 | "type": "function" 15 | }, 16 | { 17 | "constant": false, 18 | "inputs": [ 19 | { 20 | "name": "_spender", 21 | "type": "address" 22 | }, 23 | { 24 | "name": "_value", 25 | "type": "uint256" 26 | } 27 | ], 28 | "name": "approve", 29 | "outputs": [ 30 | { 31 | "name": "", 32 | "type": "bool" 33 | } 34 | ], 35 | "payable": false, 36 | "stateMutability": "nonpayable", 37 | "type": "function" 38 | }, 39 | { 40 | "constant": true, 41 | "inputs": [], 42 | "name": "totalSupply", 43 | "outputs": [ 44 | { 45 | "name": "", 46 | "type": "uint256" 47 | } 48 | ], 49 | "payable": false, 50 | "stateMutability": "view", 51 | "type": "function" 52 | }, 53 | { 54 | "constant": false, 55 | "inputs": [ 56 | { 57 | "name": "_from", 58 | "type": "address" 59 | }, 60 | { 61 | "name": "_to", 62 | "type": "address" 63 | }, 64 | { 65 | "name": "_value", 66 | "type": "uint256" 67 | } 68 | ], 69 | "name": "transferFrom", 70 | "outputs": [ 71 | { 72 | "name": "", 73 | "type": "bool" 74 | } 75 | ], 76 | "payable": false, 77 | "stateMutability": "nonpayable", 78 | "type": "function" 79 | }, 80 | { 81 | "constant": true, 82 | "inputs": [], 83 | "name": "INITIAL_SUPPLY", 84 | "outputs": [ 85 | { 86 | "name": "", 87 | "type": "uint256" 88 | } 89 | ], 90 | "payable": false, 91 | "stateMutability": "view", 92 | "type": "function" 93 | }, 94 | { 95 | "constant": true, 96 | "inputs": [], 97 | "name": "decimals", 98 | "outputs": [ 99 | { 100 | "name": "", 101 | "type": "uint256" 102 | } 103 | ], 104 | "payable": false, 105 | "stateMutability": "view", 106 | "type": "function" 107 | }, 108 | { 109 | "constant": false, 110 | "inputs": [ 111 | { 112 | "name": "_value", 113 | "type": "uint256" 114 | } 115 | ], 116 | "name": "burn", 117 | "outputs": [ 118 | { 119 | "name": "", 120 | "type": "bool" 121 | } 122 | ], 123 | "payable": false, 124 | "stateMutability": "nonpayable", 125 | "type": "function" 126 | }, 127 | { 128 | "constant": true, 129 | "inputs": [ 130 | { 131 | "name": "_owner", 132 | "type": "address" 133 | } 134 | ], 135 | "name": "balanceOf", 136 | "outputs": [ 137 | { 138 | "name": "balance", 139 | "type": "uint256" 140 | } 141 | ], 142 | "payable": false, 143 | "stateMutability": "view", 144 | "type": "function" 145 | }, 146 | { 147 | "constant": false, 148 | "inputs": [ 149 | { 150 | "name": "_from", 151 | "type": "address" 152 | }, 153 | { 154 | "name": "_value", 155 | "type": "uint256" 156 | } 157 | ], 158 | "name": "burnFrom", 159 | "outputs": [ 160 | { 161 | "name": "", 162 | "type": "bool" 163 | } 164 | ], 165 | "payable": false, 166 | "stateMutability": "nonpayable", 167 | "type": "function" 168 | }, 169 | { 170 | "constant": true, 171 | "inputs": [], 172 | "name": "symbol", 173 | "outputs": [ 174 | { 175 | "name": "", 176 | "type": "string" 177 | } 178 | ], 179 | "payable": false, 180 | "stateMutability": "view", 181 | "type": "function" 182 | }, 183 | { 184 | "constant": false, 185 | "inputs": [ 186 | { 187 | "name": "_to", 188 | "type": "address" 189 | }, 190 | { 191 | "name": "_value", 192 | "type": "uint256" 193 | } 194 | ], 195 | "name": "transfer", 196 | "outputs": [ 197 | { 198 | "name": "", 199 | "type": "bool" 200 | } 201 | ], 202 | "payable": false, 203 | "stateMutability": "nonpayable", 204 | "type": "function" 205 | }, 206 | { 207 | "constant": true, 208 | "inputs": [ 209 | { 210 | "name": "_owner", 211 | "type": "address" 212 | }, 213 | { 214 | "name": "_spender", 215 | "type": "address" 216 | } 217 | ], 218 | "name": "allowance", 219 | "outputs": [ 220 | { 221 | "name": "remaining", 222 | "type": "uint256" 223 | } 224 | ], 225 | "payable": false, 226 | "stateMutability": "view", 227 | "type": "function" 228 | }, 229 | { 230 | "inputs": [ 231 | { 232 | "name": "_name", 233 | "type": "string" 234 | }, 235 | { 236 | "name": "_symbol", 237 | "type": "string" 238 | }, 239 | { 240 | "name": "_decimals", 241 | "type": "uint256" 242 | } 243 | ], 244 | "payable": false, 245 | "stateMutability": "nonpayable", 246 | "type": "constructor" 247 | }, 248 | { 249 | "anonymous": false, 250 | "inputs": [ 251 | { 252 | "indexed": true, 253 | "name": "_burner", 254 | "type": "address" 255 | }, 256 | { 257 | "indexed": false, 258 | "name": "_value", 259 | "type": "uint256" 260 | } 261 | ], 262 | "name": "Burn", 263 | "type": "event" 264 | }, 265 | { 266 | "anonymous": false, 267 | "inputs": [ 268 | { 269 | "indexed": true, 270 | "name": "owner", 271 | "type": "address" 272 | }, 273 | { 274 | "indexed": true, 275 | "name": "spender", 276 | "type": "address" 277 | }, 278 | { 279 | "indexed": false, 280 | "name": "value", 281 | "type": "uint256" 282 | } 283 | ], 284 | "name": "Approval", 285 | "type": "event" 286 | }, 287 | { 288 | "anonymous": false, 289 | "inputs": [ 290 | { 291 | "indexed": true, 292 | "name": "from", 293 | "type": "address" 294 | }, 295 | { 296 | "indexed": true, 297 | "name": "to", 298 | "type": "address" 299 | }, 300 | { 301 | "indexed": false, 302 | "name": "value", 303 | "type": "uint256" 304 | } 305 | ], 306 | "name": "Transfer", 307 | "type": "event" 308 | } 309 | ] -------------------------------------------------------------------------------- /f_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "rpc": "https://rpc.ankr.com/eth", 3 | "apikey": "", 4 | "followAddress": "", 5 | "Purchase proportion": "0.5", 6 | "Slippage": 5, 7 | "myaddress":"", 8 | "private":"" 9 | 10 | } -------------------------------------------------------------------------------- /followAddresss.js: -------------------------------------------------------------------------------- 1 | const WebSocket = require("ws"); 2 | const BlocknativeSdk = require("bnc-sdk"); 3 | const Web3 = require("web3"); 4 | const config = require("./f_config.json"); 5 | const bep20 = require("./bep20.json"); 6 | const web3 = new Web3(config.rpc); 7 | const uniswapV2RouterAbi = require("./swap_abi"); 8 | const UniswapContractRouter = new web3.eth.Contract( 9 | uniswapV2RouterAbi, 10 | "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" 11 | ); 12 | 13 | const options = { 14 | dappId: config.apikey, 15 | ws: WebSocket, 16 | networkId: 1, 17 | onerror: (error) => { 18 | console.log(error.message); 19 | }, 20 | onopen: () => console.log("WSS链接成功"), 21 | }; 22 | 23 | const blocknative = new BlocknativeSdk(options); 24 | const { emitter } = blocknative.account(config.followAddress); 25 | 26 | emitter.on("txPool", async (transaction) => { 27 | console.log(`监控到[${config.followAddress}]发出交易`); 28 | 29 | const { maxFeePerGas, maxPriorityFeePerGas, gasPrice, value } = transaction; 30 | const methods = transaction?.contractCall?.methodName; 31 | console.log(methods); 32 | if (methods == "swapExactETHForTokens") { 33 | const contract = transaction?.contractCall?.params?.path[1]; 34 | const sendValue = web3.utils.fromWei(value, "ether"); 35 | const mysendValue = formatRoundNum(sendValue * 1 * config["Purchase proportion"],'6') 36 | 37 | 38 | let amounout = await limit( web3.utils.toWei(mysendValue.toString(),'ether'), contract); 39 | let nonce = await web3.eth.getTransactionCount(config.myaddress, "pending"); 40 | send( 41 | gasPrice ? gasPrice : gasPrice, 42 | maxFeePerGas ? maxFeePerGas : maxFeePerGas, 43 | maxPriorityFeePerGas ? maxPriorityFeePerGas : maxPriorityFeePerGas, 44 | contract, 45 | methods, 46 | amounout, 47 | web3.utils.toWei(mysendValue.toString(),'ether') , 48 | nonce 49 | ); 50 | } 51 | }); 52 | 53 | //获取比例和滑点 54 | async function limit(sendvalue, contract) { 55 | try { 56 | const bep202 = new web3.eth.Contract(bep20, contract); 57 | var dec = await bep202.methods.decimals().call(); 58 | const res = await UniswapContractRouter.methods 59 | .getAmountsOut(sendvalue, [ 60 | "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", 61 | contract, 62 | ]) 63 | .call(); 64 | 65 | //保存六位小数 66 | console.log(res) 67 | const min = formatRoundNum(getLanceWei(res[1], dec), "6"); 68 | const amountInmMin = calculateMinReceivedAmount(min, config.Slippage); 69 | console.log('最少收到',outLanceWei(amountInmMin.toString(), dec)) 70 | return outLanceWei(amountInmMin.toString(), dec); 71 | } catch (error) { 72 | console.log(error); 73 | } 74 | } 75 | 76 | //滑点计算 77 | function calculateMinReceivedAmount(amountIn, slippage) { 78 | const slippagePercent = slippage / 100; 79 | const minReceivedAmount = amountIn / (1 + slippagePercent); 80 | return formatRoundNum(minReceivedAmount, 6); 81 | } 82 | 83 | async function send( 84 | gasPrice, 85 | maxFeePerGas, 86 | maxPriorityFeePerGas, 87 | contract, 88 | methods, 89 | amounout, 90 | value, 91 | nonce 92 | ) { 93 | const deadline = Math.floor(Date.now() / 1000) + 60 * parseInt(20); 94 | 95 | //swapETHForExactTokens 96 | const transfer = UniswapContractRouter.methods[methods]( 97 | amounout, 98 | ["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", contract], 99 | config.myaddress, 100 | deadline 101 | ); 102 | const encodedABI = transfer.encodeABI(); 103 | 104 | let tx = gasPrice 105 | ? { 106 | from: config.myaddress, 107 | to: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", 108 | value, 109 | nonce, 110 | data: encodedABI, 111 | } 112 | : { 113 | from: config.myaddress, 114 | to: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", 115 | value, 116 | nonce, 117 | data: encodedABI, 118 | }; 119 | try { 120 | const gaslimit = parseInt((await web3.eth.estimateGas(tx)) * 1.2) + ""; 121 | tx = gasPrice 122 | ? { 123 | from: config.myaddress, 124 | to: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", 125 | gas: gaslimit, 126 | value, 127 | nonce, 128 | gasPrice: web3.utils.toWei(gasPrice, "gwei"), 129 | data: encodedABI, 130 | } 131 | : { 132 | from: config.myaddress, 133 | to: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", 134 | gas: gaslimit, 135 | maxFeePerGas, 136 | value, 137 | nonce, 138 | maxPriorityFeePerGas, 139 | data: encodedABI, 140 | }; 141 | console.log(tx); 142 | sendTry(tx, config.private).then(console.log); 143 | } catch (error) { 144 | console.log(error.message); 145 | } 146 | 147 | } 148 | 149 | async function sendTry(tx, privateKey) { 150 | try { 151 | var signed = await web3.eth.accounts.signTransaction(tx, privateKey); 152 | 153 | var tran = await web3.eth.sendSignedTransaction(signed.rawTransaction); 154 | return tran; 155 | } catch (error) { 156 | console.log(error); 157 | } 158 | } 159 | 160 | 161 | // 保留位数 162 | const formatRoundNum = (num, pre) => 163 | (Math.floor(num * Math.pow(10, pre)) / Math.pow(10, pre)).toFixed(pre); 164 | 165 | function getLanceWei(amount, decimal) { 166 | var out_amount = amount; 167 | var wei = "ether"; 168 | var length_d = 19 - decimal; 169 | if (decimal != 18) { 170 | amount = PrefixInteger(amount, length_d); 171 | } 172 | out_amount = web3.utils.fromWei(amount, "ether"); 173 | return out_amount; 174 | } 175 | function outLanceWei(amount, decimal) { 176 | var out_amount = amount; 177 | var wei = "ether"; 178 | var length_d = 18 - decimal; 179 | out_amount = web3.utils.toWei(amount, "ether"); 180 | if (decimal != 18) { 181 | out_amount = out_amount.substr(0, out_amount.length - length_d); 182 | } 183 | return out_amount; 184 | } 185 | function PrefixInteger(num, length) { 186 | return num + Array(length).join("0"); 187 | } 188 | -------------------------------------------------------------------------------- /swap_abi.js: -------------------------------------------------------------------------------- 1 | const ABI = [{"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":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETHSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapETHForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}] 2 | 3 | module.exports = ABI; --------------------------------------------------------------------------------