<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_balance_proof_safe_for_onchain_operations( balance_proof: BalanceProofSignedState, ) -> bool: """ Check if the balance proof would overflow onchain. """

    total_amount = balance_proof.transferred_amount + balance_proof.locked_amount
    return total_amount <= UINT256_MAX