tl_getinsuranceordersnapshot is the priority, we can get by taking data from this part of insurance.cpp:
Line 54
int64_t InsuranceFund::GetFeesTotal(uint32_t pid) const
{
auto n1 = get_fees_balance(g_fees->native_fees, pid);
auto n2 = get_fees_balance(g_fees->oracle_fees, pid);
auto n3 = get_fees_balance(g_fees->spot_fees, pid);
return n1 + n2 + n3;
}
tl_getinsurancepayouts
Add a level db data save in the function at Line 106, then refer to that history of events. Be able to look up by contract id.
tl_getsocializations
Add a levelDB data save in the function near the end of TradeLayer.cpp that does socializations and be able to refer to the history of these events by contractid.
In case of any doubht the "function at Line 106" is now 108 and can change, the name is: std::tuple<bool, int64_t> InsuranceFund::PayOut(uint32_t pid, int64_t amount)
tl_getinsuranceordersnapshot is the priority, we can get by taking data from this part of insurance.cpp:
Line 54 int64_t InsuranceFund::GetFeesTotal(uint32_t pid) const { auto n1 = get_fees_balance(g_fees->native_fees, pid); auto n2 = get_fees_balance(g_fees->oracle_fees, pid); auto n3 = get_fees_balance(g_fees->spot_fees, pid); return n1 + n2 + n3; }
tl_getinsurancepayouts
Add a level db data save in the function at Line 106, then refer to that history of events. Be able to look up by contract id.
tl_getsocializations
Add a levelDB data save in the function near the end of TradeLayer.cpp that does socializations and be able to refer to the history of these events by contractid.