You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In solidity, in a smart contract, you can also call functions in another smart contract, e.g.
function safeTransferFrom(address token, address from, address to, uint value) internal { (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');}
In this example token.call, it is calling another token's transfer function.
I'm wondering whether Leo support such feature?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi there, I'm learning on how to use Leo.
In solidity, in a smart contract, you can also call functions in another smart contract, e.g.
function safeTransferFrom(address token, address from, address to, uint value) internal { (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');}
In this example
token.call
, it is calling another token's transfer function.I'm wondering whether Leo support such feature?
Thanks in advance.
The text was updated successfully, but these errors were encountered: