Skip to main content

ISuperfluidPool

This is the technical reference related to the interface for any super token pool regardless of the distribution schemes.

ABI

In order to interact with the ISuperfluidPool contract, you can use the following ABI:

Click here to show ISuperfluidPool ABI

[
{
"inputs": [],
"name": "SUPERFLUID_POOL_INVALID_TIME",
"type": "error"
},
{
"inputs": [],
"name": "SUPERFLUID_POOL_NOT_GDA",
"type": "error"
},
{
"inputs": [],
"name": "SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA",
"type": "error"
},
{
"inputs": [],
"name": "SUPERFLUID_POOL_NO_POOL_MEMBERS",
"type": "error"
},
{
"inputs": [],
"name": "SUPERFLUID_POOL_NO_ZERO_ADDRESS",
"type": "error"
},
{
"inputs": [],
"name": "SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED",
"type": "error"
},
{
"inputs": [],
"name": "SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "contract ISuperfluidToken",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "member",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "claimedAmount",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "totalClaimed",
"type": "int256"
}
],
"name": "DistributionClaimed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "contract ISuperfluidToken",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "member",
"type": "address"
},
{
"indexed": false,
"internalType": "uint128",
"name": "oldUnits",
"type": "uint128"
},
{
"indexed": false,
"internalType": "uint128",
"name": "newUnits",
"type": "uint128"
}
],
"name": "MemberUnitsUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memberAddr",
"type": "address"
}
],
"name": "claimAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "claimAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "subtractedValue",
"type": "uint256"
}
],
"name": "decreaseAllowance",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "distributionFromAnyAddress",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memberAddr",
"type": "address"
},
{
"internalType": "uint32",
"name": "time",
"type": "uint32"
}
],
"name": "getClaimable",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memberAddr",
"type": "address"
}
],
"name": "getClaimableNow",
"outputs": [
{
"internalType": "int256",
"name": "claimableBalance",
"type": "int256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "time",
"type": "uint32"
}
],
"name": "getDisconnectedBalance",
"outputs": [
{
"internalType": "int256",
"name": "balance",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memberAddr",
"type": "address"
}
],
"name": "getMemberFlowRate",
"outputs": [
{
"internalType": "int96",
"name": "",
"type": "int96"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memberAddr",
"type": "address"
}
],
"name": "getTotalAmountReceivedByMember",
"outputs": [
{
"internalType": "uint256",
"name": "totalAmountReceived",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalConnectedFlowRate",
"outputs": [
{
"internalType": "int96",
"name": "",
"type": "int96"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalConnectedUnits",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalDisconnectedFlowRate",
"outputs": [
{
"internalType": "int96",
"name": "",
"type": "int96"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalDisconnectedUnits",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalFlowRate",
"outputs": [
{
"internalType": "int96",
"name": "",
"type": "int96"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalUnits",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memberAddr",
"type": "address"
}
],
"name": "getUnits",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "addedValue",
"type": "uint256"
}
],
"name": "increaseAllowance",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "superToken",
"outputs": [
{
"internalType": "contract ISuperfluidToken",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "transferabilityForUnitsOwner",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memberAddr",
"type": "address"
},
{
"internalType": "uint128",
"name": "newUnits",
"type": "uint128"
}
],
"name": "updateMemberUnits",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]

SUPERFLUID_POOL_INVALID_TIME

error SUPERFLUID_POOL_INVALID_TIME()

SUPERFLUID_POOL_NO_POOL_MEMBERS

error SUPERFLUID_POOL_NO_POOL_MEMBERS()

SUPERFLUID_POOL_NO_ZERO_ADDRESS

error SUPERFLUID_POOL_NO_ZERO_ADDRESS()

SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA

error SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA()

SUPERFLUID_POOL_NOT_GDA

error SUPERFLUID_POOL_NOT_GDA()

SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED

error SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED()

SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED

error SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED()

Event MemberUnitsUpdated

event MemberUnitsUpdated(
contract ISuperfluidToken token,
address member,
uint128 oldUnits,
uint128 newUnits
)

Parameters

NameTypeDescription
tokencontract ISuperfluidToken
memberaddress
oldUnitsuint128
newUnitsuint128

Event DistributionClaimed

event DistributionClaimed(
contract ISuperfluidToken token,
address member,
int256 claimedAmount,
int256 totalClaimed
)

Parameters

NameTypeDescription
tokencontract ISuperfluidToken
memberaddress
claimedAmountint256
totalClaimedint256

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 ISuperfluidToken)

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 memberAddr
)
external
returns (uint128)

Parameters

NameTypeDescription
memberAddraddressThe address of the member

The total number of units for memberAddr

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

NameTypeDescription
timeuint32The time to query

The balance of all the disconnected members at time

Fn getTotalAmountReceivedByMember

function getTotalAmountReceivedByMember(
address memberAddr
)
external
returns (uint256 totalAmountReceived)

Parameters

NameTypeDescription
memberAddraddressThe address of the member

Return Values

NameTypeDescription
totalAmountReceiveduint256The total amount received by the member

The total amount received by memberAddr in the pool

Fn getMemberFlowRate

function getMemberFlowRate(
address memberAddr
)
external
returns (int96)

Parameters

NameTypeDescription
memberAddraddressThe 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

NameTypeDescription
memberAddraddressThe address of the member
timeuint32The 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

NameTypeDescription
memberAddraddressThe 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

NameTypeDescription
memberAddraddressThe address of the member
newUnitsuint128The new units for the member

Sets memberAddr ownedUnits to newUnits

Fn claimAll

function claimAll(
address memberAddr
)
external
returns (bool)

Parameters

NameTypeDescription
memberAddraddressThe 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

NameTypeDescription
spenderaddressThe address of the spender
addedValueuint256The amount to increase the allowance by

Return Values

NameTypeDescription
[0]booltrue if successful

Increases the allowance of spender by addedValue

Fn decreaseAllowance

function decreaseAllowance(
address spender,
uint256 subtractedValue
)
external
returns (bool)

Parameters

NameTypeDescription
spenderaddressThe address of the spender
subtractedValueuint256The amount to decrease the allowance by

Return Values

NameTypeDescription
[0]booltrue if successful

Decreases the allowance of spender by subtractedValue