Skip to main content

BalanceDelta

Git Source - Generated with forge doc

Two int128 values packed into a single int256 where the upper 128 bits represent the amount0 and the lower 128 bits represent the amount1.

type BalanceDelta is int256;

BalanceDeltaLibrary

Git Source

Library for getting the amount0 and amount1 deltas from the BalanceDelta type

State Variables

ZERO_DELTA

A BalanceDelta of 0

BalanceDelta public constant ZERO_DELTA = BalanceDelta.wrap(0);

Functions

amount0

function amount0(BalanceDelta balanceDelta) internal pure returns (int128 _amount0);

amount1

function amount1(BalanceDelta balanceDelta) internal pure returns (int128 _amount1);

sub

Git Source

function sub(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta);

toBalanceDelta

Git Source

function toBalanceDelta(int128 _amount0, int128 _amount1) pure returns (BalanceDelta balanceDelta);

eq

Git Source

function eq(BalanceDelta a, BalanceDelta b) pure returns (bool);

add

Git Source

function add(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta);

neq

Git Source

function neq(BalanceDelta a, BalanceDelta b) pure returns (bool);