Skip to main content

Reference

Interfaces, signatures, parameters, and generated references.

Lookup friendly
TOC available

TransientStateLibrary

A helper library to provide state getters that use exttload

Functions​

getSyncedReserves​

returns the reserves for the synced currency

returns 0 if the reserves are not synced or value is 0. Checks the synced currency to only return valid reserve values (after a sync and before a settle).

function getSyncedReserves(IPoolManager manager) internal view returns (uint256);

Parameters

NameTypeDescription
managerIPoolManagerThe pool manager contract.

Returns

NameTypeDescription
<none>uint256uint256 The reserves of the currency.

getSyncedCurrency​

function getSyncedCurrency(IPoolManager manager) internal view returns (Currency);

getNonzeroDeltaCount​

Returns the number of nonzero deltas open on the PoolManager that must be zeroed out before the contract is locked

function getNonzeroDeltaCount(IPoolManager manager) internal view returns (uint256);

currencyDelta​

Get the current delta for a caller in the given currency

function currencyDelta(IPoolManager manager, address target, Currency currency) internal view returns (int256);

Parameters

NameTypeDescription
managerIPoolManager
targetaddressThe credited account address
currencyCurrencyThe currency for which to lookup the delta

isUnlocked​

Returns whether the contract is unlocked or not

function isUnlocked(IPoolManager manager) internal view returns (bool);