I have a smart contract where user can transfer ETH to an ICO. Like this
function buyICO(paymentAddress, amount) {
// do some other important things
// transfer the amount to the payment address
paymentAddress.transfer(amount);
}
Because some ICOs require a specific gas price and limit, but I can't set these in the transfer function. I can set it when user call buyICO() function but I don't know how do I calculate the gas limit and price for the whole thing.
What's the best practice here?