Pancakeswap Router Statement on V1 and V2

Sigit H. Yudanto
1 min readJul 16, 2021

If you’re using fork of someone else token (.sol) on Binance Smart Chain always double check for the pancakeswap router address. FYI, Pancakeswap now migrate to V2.

Pancakeswap router V1 address statement:

constructor () public {
_rOwned[_msgSender()] = _rTotal;

IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;

//exclude owner and this contract from fee
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;

emit Transfer(address(0), _msgSender(), _tTotal);
}

This is the router address for pancakeswap V2 0x10ED43C718714eb63d5aA57B78B54704E256024E more information check on this url https://bscscan.com/address/0x10ed43c718714eb63d5aa57b78b54704e256024e

Statement for pancakeswap router V2 address should be like this.

constructor () public {
_rOwned[_msgSender()] = _rTotal;

IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;

//exclude owner and this contract from fee
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;

emit Transfer(address(0), _msgSender(), _tTotal);
}

Ciao. 💎

--

--

Sigit H. Yudanto

⛓️ Blockchain Basic Certified (Coursera) University at Buffalo & State University of New York. ✉️ Inquiry: hello[at]sigit.co.uk