ITagomiPool
This is the technical reference related to the interface for any super token pool regardless of the distribution schemes.
struct PoolIndexData
struct PoolIndexData {
uint128 totalUnits;
uint32 wrappedSettledAt;
int96 wrappedFlowRate;
int256 wrappedSettledValue;
}
struct MemberData
struct MemberData {
uint128 ownedUnits;
uint32 syncedSettledAt;
int96 syncedFlowRate;
int256 syncedSettledValue;
int256 settledValue;
int256 claimedValue;
}
Tagomi_POOL_INVALID_TIME
error Tagomi_POOL_INVALID_TIME()
Tagomi_POOL_NO_POOL_MEMBERS
error Tagomi_POOL_NO_POOL_MEMBERS()
Tagomi_POOL_NO_ZERO_ADDRESS
error Tagomi_POOL_NO_ZERO_ADDRESS()
Tagomi_POOL_NOT_POOL_ADMIN_OR_GDA
error Tagomi_POOL_NOT_POOL_ADMIN_OR_GDA()
Tagomi_POOL_NOT_GDA
error Tagomi_POOL_NOT_GDA()
Tagomi_POOL_TRANSFER_UNITS_NOT_ALLOWED
error Tagomi_POOL_TRANSFER_UNITS_NOT_ALLOWED()
Event MemberUnitsUpdated
event MemberUnitsUpdated(
contract ITagomiToken token,
address member,
uint128 oldUnits,
uint128 newUnits
)
Parameters
token
contract ITagomiToken
member
address
oldUnits
uint128
newUnits
uint128
Event DistributionClaimed
event DistributionClaimed(
contract ITagomiToken token,
address member,
int256 claimedAmount,
int256 totalClaimed
)
Parameters
token
contract ITagomiToken
member
address
claimedAmount
int256
totalClaimed
int256
Fn transferabilityForUnitsOwner
function transferabilityForUnitsOwner(
)
external
returns (bool)
A boolean indicating whether pool members can transfer their units
Fn distributionFromAnyAddress
function distributionFromAnyAddress(
)
external
returns (bool)
A boolean indicating whether addresses other than the pool admin can distribute via the pool
Fn admin
function admin(
)
external
returns (address)
The admin is the creator of the pool and has permissions to update member units and is the recipient of the adjustment flow rate
The pool admin
Fn superToken
function superToken(
)
external
returns (contract ITagomiToken)
The SuperToken for the pool
Fn getTotalUnits
function getTotalUnits(
)
external
returns (uint128)
The total units of the pool
Fn getTotalConnectedUnits
function getTotalConnectedUnits(
)
external
returns (uint128)
The total number of units of connected members
Fn getTotalDisconnectedUnits
function getTotalDisconnectedUnits(
)
external
returns (uint128)
The total number of units of disconnected members
Fn getUnits
function getUnits(
address memberAddress
)
external
returns (uint128)
Parameters
memberAddress
address
The address of the member
The total number of units for memberAddress
Fn getTotalFlowRate
function getTotalFlowRate(
)
external
returns (int96)
The total flow rate of the pool
Fn getTotalConnectedFlowRate
function getTotalConnectedFlowRate(
)
external
returns (int96)
The flow rate of the connected members
Fn getTotalDisconnectedFlowRate
function getTotalDisconnectedFlowRate(
)
external
returns (int96)
The flow rate of the disconnected members
Fn getDisconnectedBalance
function getDisconnectedBalance(
uint32 time
)
external
returns (int256 balance)
Parameters
time
uint32
The time to query
The balance of all the disconnected members at time
Fn getMemberFlowRate
function getMemberFlowRate(
address memberAddress
)
external
returns (int96)
Parameters
memberAddress
address
The address of the member
The flow rate a member is receiving from the pool
Fn getClaimable
function getClaimable(
address memberAddr,
uint32 time
)
external
returns (int256)
Parameters
memberAddr
address
The address of the member
time
uint32
The time to query
The claimable balance for memberAddr
at time
in the pool
Fn getClaimableNow
function getClaimableNow(
address memberAddr
)
external
returns (int256 claimableBalance, uint256 timestamp)
Parameters
memberAddr
address
The address of the member
The claimable balance for memberAddr
at block.timestamp
in the pool
Fn updateMemberUnits
function updateMemberUnits(
address memberAddr,
uint128 newUnits
)
external
returns (bool)
Parameters
memberAddr
address
The address of the member
newUnits
uint128
The new units for the member
Sets memberAddr
ownedUnits to newUnits
Fn claimAll
function claimAll(
address memberAddr
)
external
returns (bool)
Parameters
memberAddr
address
The address of the member
Claims the claimable balance for memberAddr
at block.timestamp
Fn claimAll
function claimAll(
)
external
returns (bool)
Claims the claimable balance for msg.sender
at block.timestamp
Fn increaseAllowance
function increaseAllowance(
address spender,
uint256 addedValue
)
external
returns (bool)
Parameters
spender
address
The address of the spender
addedValue
uint256
The amount to increase the allowance by
Return Values
[0]
bool
true if successful
Increases the allowance of spender
by addedValue
Fn decreaseAllowance
function decreaseAllowance(
address spender,
uint256 subtractedValue
)
external
returns (bool)
Parameters
spender
address
The address of the spender
subtractedValue
uint256
The amount to decrease the allowance by
Return Values
[0]
bool
true if successful
Decreases the allowance of spender
by subtractedValue
Last updated
Was this helpful?