/** * @dev Checks if a transfer/override may take place between the two accounts. * * Validates that the transfer can take place. * - Ensure the 'to' address is not cancelled * - Ensure the transfer is compliant * @param from The sender address. * @param to The recipient address. * @param tokens The number of tokens being transferred. * @param isOverride If this is a transfer override * @return If the transfer can take place. */ function canTransfer(address from, address to, uint256 tokens, bool isOverride) private isNotCancelled(to) returns (bool) { // Don't allow overrides and ignore compliance rules when compliance not set. if (address(compliance) == ZERO_ADDRESS) { return !isOverride; } // Ensure the override is valid, or that the transfer is compliant. if (isOverride) { return compliance.canOverride(msg.sender, from, to, tokens); } else { return compliance.canTransfer(msg.sender, from, to, tokens); } }
0.4.18