IVeArtProxy

Git Source

Functions

tokenURI

Generate a SVG based on veNFT metadata

function tokenURI(uint256 _tokenId)
    external
    view
    returns (string memory output);

Parameters

NameTypeDescription
_tokenIduint256Unique veNFT identifier

Returns

NameTypeDescription
outputstringSVG metadata as HTML tag

lineArtPathsOnly

Generate only the foreground elements of the line art for an NFT (excluding SVG header), for flexibility purposes.

function lineArtPathsOnly(uint256 _tokenId)
    external
    view
    returns (bytes memory output);

Parameters

NameTypeDescription
_tokenIduint256Unique veNFT identifier

Returns

NameTypeDescription
outputbytesEncoded output of generateShape()

generateConfig

Generate the master art config metadata for a veNFT

function generateConfig(uint256 _tokenId)
    external
    view
    returns (Config memory cfg);

Parameters

NameTypeDescription
_tokenIduint256Unique veNFT identifier

Returns

NameTypeDescription
cfgConfigConfig struct

twoStripes

Generate the points for two stripe lines based on the config generated for a veNFT

function twoStripes(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of line drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn stripes

circles

Generate the points for circles based on the config generated for a veNFT

function circles(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of circles drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn circles

interlockingCircles

Generate the points for interlocking circles based on the config generated for a veNFT

function interlockingCircles(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of interlocking circles drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn interlocking circles

corners

Generate the points for corners based on the config generated for a veNFT

function corners(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of corners drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn corners

curves

Generate the points for a curve based on the config generated for a veNFT

function curves(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of curve drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn curve

spiral

Generate the points for a spiral based on the config generated for a veNFT

function spiral(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of spiral drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn spiral

explosion

Generate the points for an explosion based on the config generated for a veNFT

function explosion(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of explosion drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn explosion

wormhole

Generate the points for a wormhole based on the config generated for a veNFT

function wormhole(Config memory cfg, int256 l)
    external
    pure
    returns (Point[100] memory Line);

Parameters

NameTypeDescription
cfgConfigMaster art config metadata of a veNFT
lint256Number of wormhole drawn

Returns

NameTypeDescription
LinePoint[100](x, y) coordinates of the drawn wormhole

Structs

Config

Art configuration

struct Config {
    int256 _tokenId;
    int256 _balanceOf;
    int256 _lockedEnd;
    int256 _lockedAmount;
    int256 shape;
    uint256 palette;
    int256 maxLines;
    int256 dash;
    int256 seed1;
    int256 seed2;
    int256 seed3;
}

lineConfig

Individual line art path variables.

struct lineConfig {
    bytes8 color;
    uint256 stroke;
    uint256 offset;
    uint256 offsetHalf;
    uint256 offsetDashSum;
    uint256 pathLength;
}

Point

Represents an (x,y) coordinate in a line.

struct Point {
    int256 x;
    int256 y;
}