0

I have a cloneFactory which produces ERC20 compliant clones based on a master template.

I’m able to deploy my clones and even create pairs for the clones. But when I want to add liquidity (addLiquidityETH) function of the uniswapv2router or even do it manually via the uniswap interface, it doesn’t allow me.

I get the “TransactionHelper: TRANSFER_FAILED_FROM” but both programmaticly and manual they have the right approval/ allowance.

Since a clone is derived from a deployed master, its ABI and bytecode and the uniswap router does check on it in:

function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

Maybe it has effect on it, I don’t know anymore :) anyone has a clue?

1 Answer 1

0

how did you solve this? facing the same issue

New contributor
Noor ul Ain Afaq Ahmed is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.