Error while trying to deploy a test token with Remix

Hi guys,

i'm trying to deploy a test token on BSC testnet, but I'm encountering an issue.image

Some screenshot of remix.

Here the constructor code:

constructor (address router, address payable _marketingAddress)
        ERC20Detailed("TestToken", "TToken", uint8(DECIMALS))
        payable
        public
    {
        marketingAddress = _marketingAddress;

        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(router);

        uniswapV2PairAddress = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());

        uniswapV2Router = _uniswapV2Router;

        setLP(uniswapV2PairAddress);

        IUniswapV2Pair _uniswapV2Pair = IUniswapV2Pair(uniswapV2PairAddress);

        uniswapV2Pair = _uniswapV2Pair;

        _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
        _gonBalances[msg.sender] = TOTAL_GONS;
        _gonsPerFragment = TOTAL_GONS.div(_totalSupply);

        initialDistributionFinished = false;

        //exclude owner and this contract from fee
        _isExcluded[owner()] = true;
        _isExcluded[address(this)] = true;
        master.push(msg.sender);

        emit Transfer(address(0x0), msg.sender, _totalSupply);
    }

It works for other token, but on this one I have problems. Even if I remove the "payable" keyword it doesn't work. What should I check?

You are on testnet so you must use testnet router

1 Like

Yeah, that solved the problem! Thank you!!