Set Documentation
Search…
SetToken
ERC20 Token contract that allows privileged modules to make modifications to its positions and invoke function calls from the SetToken.

Select View Methods

manager()

function manager() view returns (address)
Returns the manager of the SetToken.
Return Name
Type
Description
manager
address
Address of the SetToken's manager

getModules()

function getModules() external view returns (address[] memory)
Returns the list of modules a SetToken has enabled.
Return Name
Type
Description
modules
address[]
List of enabled modules

getPositions()

function getPositions() public view returns (ISetToken.Position[] memory)
Retrieves the positions in an array from the SetToken. A position definition is as follows:
1
/**
2
* The base definition of a SetToken Position
3
*
4
* @param component Address of token in the Position
5
* @param module If not in default state, the address of associated module
6
* @param unit Each unit is the # of components per 10^18 of a SetToken
7
* @param positionState The type of position denoted as a uint8
8
* @param data Arbitrary data
9
*/
10
struct Position {
11
address component;
12
address module;
13
int256 unit;
14
uint8 positionState;
15
bytes data;
16
}
Copied!
Return Name
Type
Description
positions
Position[]
List of positions

getComponents()

function getComponents() public view returns (address[] memory)
Returns the list of component assets in the SetToken.
Return Name
Type
Description
components
address[]
List of components

getDefaultPositionRealUnit()

function getDefaultPositionRealUnit(address _component) external view returns (int256)
Returns the component real unit of a Default position.
Parameter Name
Type
Description
_component
address
Address of the component asset
Return Name
Type
Description
componentUnit
int256[]
Position real unit of the component (signed integer)

getExternalPositionRealUnit()

function getExternalPositionRealUnit(address _component, address _positionModule) public view returns(int256)
Returns the component real unit of an External position.
Parameter Name
Type
Description
_component
address
Address of the component asset
_positionModule
address
Module the external position is associated with
Return Name
Type
Description
componentUnit
int256[]
Position real unit of the component (signed integer)

getTotalComponentRealUnits()

function getTotalComponentRealUnits(address _component) external view returns(int256)β€Œ
Returns the total component real units of a position, summing the Default and External.
Parameter Name
Type
Description
_component
address
Address of the component asset
Return Name
Type
Description
componentUnit
int256[]
Position real unit of the component (signed integer)
Last modified 10mo ago