to transfer tokens from the contract address
(address token, address from, address tok uint256 value) ⇒ (bool success)
Checking this page. It describes what I mean.safeTransfer
ADDRESS.call(abi.encodeWithSelector(FUNCTIONID, from, to, value))
token (WETH) = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
from(Vitalic.eth) = 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
to(MyWallet) = 0xaD890f60399E9feaaf2ff5d5973e7eC8302a8247
value = 100000000
function safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
// 0x23b872dd == (keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(P
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::transferFrom: transferFrom failed'
);
}
https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol#L33