I mean that thirdPartyContract.sol might have the following implementation:
pragma solidity ^0.4.11;
contract TPCToken {
function CORAddress() constant public returns (address) {}
function CORPAddress() constant public returns (address) {}
function receiveToken(address, uint256, bytes) external returns (bool, uint256) {
if(msg.sender == CORAddress()) {
// We have received COR.
}
if(msg.sender == CORPAddress()) {
// We have received CORP.
}
else {
// We have received strange token
// that is not related to CORION platform
// but uses the same fallback function names.
throw;
}
}
function approvedToken(address, uint256, bytes) external returns (bool) {
if(msg.sender == CORAddress()) {
// We have received approval of COR.
}
if(msg.sender == CORPAddress()) {
// We have received approval of CORP.
}
else {
// We have received approval of strange token
// that is not related to CORION platform
// but uses the same fallback function names.
throw;
}
}
}
I mean that
thirdPartyContract.sol
might have the following implementation: