FactorLeverageDescriptor.sol

Contract Overview

The FactorLeverageDescriptor.sol contract enables the SVG representation of a position to be generated on-chain. This is achieved via the encoding of position metadata as SVG strings.

Properties

Public

Structs

TokenURIParams

A struct that defines the URI of the token (representing a position on the underlying Leverage Vault contract).

Methods

setTokenName() - external

Updates the token name (i.e. symbol) for the provided tokenAddress.

Parameters

constructTokenURI() - public view returns

Assembles the encoded string which contains the ERC721 metadata JSON. This includes a base64 string representation of the position's SVG image that contains position data.

Parameters

Returns

renderImage() - private view returns

Renders a base64 string that represents the position's information in a SVG format.

Parameters

Returns

renderId() - private view returns

Renders a SVG string of the position identifier.

Parameters

Returns

renderStrategy() - private view returns

Renders a SVG string of the Strategy's asset and debt names (i.e. symbols).

Parameters

Returns

renderAsset() - private view returns

Renders a SVG string of the position's asset balance.

Parameters

Returns

renderDebt() - private view returns

Renders a SVG string of the position's asset balance.

Parameters

Returns

Last updated