How do i approve my smart contract to sell tokens that I currently hold on pancakeswap. At the moment this is what I am doing.

interface IBEP20 {
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);

function approve(address spender, uint256 amount) external returns (bool);
}

address private constant PANCAKESWAP_V2_ROUTER = 0x10ED43C718714eb63d5aA57B78B54704E256024E;

IBEP20(path[0]).approve(
address(PANCAKESWAP_V2_ROUTER),
115792089237316195423570985008687907853269984665640564039457584007913129639935
);

Aug 26, 2021, 12:42 PM

© 2024 Draquery.com All rights reserved.