Set Token

The Set Token contract is an 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.

getModules()

function getModules() external view returns (address[] memory)

Returns the list of modules a SetToken has enabled.

getPositions()

function getPositions() public view returns (ISetToken.Position[] memory)

Retrieves the positions in an array from the SetToken. A position definition is as follows:

    /**
     * The base definition of a SetToken Position
     *
     * @param component           Address of token in the Position
     * @param module              If not in default state, the address of associated module
     * @param unit                Each unit is the # of components per 10^18 of a SetToken
     * @param positionState       The type of position denoted as a uint8
     * @param data                Arbitrary data
     */
    struct Position {
        address component;
        address module;
        int256 unit;
        uint8 positionState;
        bytes data;
    }

getComponents()

function getComponents() public view returns (address[] memory)

Returns the list of component assets in the SetToken.

getDefaultPositionRealUnit()

function getDefaultPositionRealUnit(address _component) external view returns (int256)

Returns the component real unit of a Default position.

getExternalPositionRealUnit()

function getExternalPositionRealUnit(address _component, address _positionModule) public view returns(int256)

Returns the component real unit of an External position.

getTotalComponentRealUnits()

function getTotalComponentRealUnits(address _component) external view returns(int256)

Returns the total component real units of a position, summing the Default and External.

Last updated