onKIP7Received 를통하여 수신이벤트 감지후
토큰 종류를 구분하여 서비스를 진행하고자 합니다.
onKIP7Received 를 통하여 토큰을 수신하였을때 토큰의 종류를 알려면 무엇을 참조하면 좋을가요?
onKIP7Received 를통하여 수신이벤트 감지후
토큰 종류를 구분하여 서비스를 진행하고자 합니다.
onKIP7Received 를 통하여 토큰을 수신하였을때 토큰의 종류를 알려면 무엇을 참조하면 좋을가요?
자답입니다.
interface IKIP7TokenReceiver {
/// @notice Handle the receipt of KIP-7 token
/// @dev The KIP-7 smart contract calls this function on the recipient
/// after a `safeTransfer`. This function MAY throw to revert and reject the
/// transfer. Return of other than the magic value MUST result in the
/// transaction being reverted.
///
> Note: the contract address is always the message sender.
/// @param _operator The address which called `safeTransferFrom` function
/// @param _from The address which previously owned the token
/// @param _amount The token amount which is being transferred.
/// @param _data Additional data with no specified format
/// @return `bytes4(keccak256("onKIP7Received(address,address,uint256,bytes)"))`
/// unless throwing
function onKIP7Received(address _operator, address _from, uint256 _amount, bytes _data) external returns(bytes4);
}