use super::HandleTypeInfo;

pub trait LogApi: HandleTypeInfo {
    type LogApiImpl: LogApiImpl
        + HandleTypeInfo<
            ManagedBufferHandle = Self::ManagedBufferHandle,
            BigIntHandle = Self::BigIntHandle,
            BigFloatHandle = Self::BigFloatHandle,
            EllipticCurveHandle = Self::EllipticCurveHandle,
        >;

    fn log_api_impl() -> Self::LogApiImpl;
}

/// Interface to only be used by code generated by the macros.
/// The smart contract code doesn't have access to these methods directly.
pub trait LogApiImpl: HandleTypeInfo {
    /// Saves an event log.
    fn managed_write_log(
        &self,
        topics_handle: Self::ManagedBufferHandle,
        data_handle: Self::ManagedBufferHandle,
    );
}
