FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
transfer.hpp File Reference

An internal transfer: an amount of one asset moved between two accounts of the same exchange (the accounts of a pool, core/account_pool.hpp), as a connector that can do it carries it out (venues::Venue::transfer, VenueCaps::internal_transfer) and the pool treasury asks for it (core/treasury.hpp). More...

#include "fastmm/core/fixed_point.hpp"
#include "fastmm/core/strong_id.hpp"
#include <cstdint>
#include <string>
#include <string_view>

Go to the source code of this file.

Classes

struct  fastmm::TransferRequest
 
struct  fastmm::TransferResult
 

Namespaces

namespace  fastmm
 

Enumerations

enum class  fastmm::TransferState : std::uint8_t {
  fastmm::Pending = 0 , fastmm::Done = 1 , fastmm::Failed = 2 , fastmm::NotFound = 3 ,
  fastmm::Unknown = 4
}
 

Functions

constexpr std::string_view fastmm::to_string (TransferState s) noexcept
 

Detailed Description

An internal transfer: an amount of one asset moved between two accounts of the same exchange (the accounts of a pool, core/account_pool.hpp), as a connector that can do it carries it out (venues::Venue::transfer, VenueCaps::internal_transfer) and the pool treasury asks for it (core/treasury.hpp).

Control path only: these types allocate.

A transfer is named by client_id, unique per transfer and never reused: the venue is asked for it under that id, and its state is asked for by that id after a timeout or a restart, so a transfer whose answer was lost is looked up instead of sent twice.