feat: Hook up base_fee host function

This commit is contained in:
TimothyBanks
2026-08-10 15:19:52 -04:00
parent 6abd492ebb
commit 9a6efde771
11 changed files with 92 additions and 1 deletions

View File

@@ -95,6 +95,18 @@ HostContext::getParentLedgerHash(rust::Slice<std::uint8_t> out) const noexcept
});
}
std::int32_t
HostContext::getBaseFee(rust::Slice<std::uint8_t> out) const noexcept
{
return guarded(hostFunctions_.getJournal(), kHostInternal, [&] {
auto const fee = hostFunctions_.getBaseFee();
if (!fee)
return hfErrorToInt(fee.error());
return answerScalar(out, *fee);
});
}
std::int32_t
HostContext::getCurrentLedgerObjField(std::int32_t field, rust::Slice<std::uint8_t> out)
const noexcept