Frame

An immutable contract that stitches together on-chain data and returns a web page string.

Functions

init

Initializes a new frame with all the data necessary to render a complete html string from different data stores. This method can only be called once.

function init(
        Asset[] calldata _deps,
        address _sourceStore,
        address _pageWrapStore,
        uint256[4][] calldata _renderMap
) external

Parameters

Name
Type
Description

_deps

Asset[]

An array of dependencies to import, including the Frame's source, in the order they will be rendered to the page

_sourceStore

address

A FrameDataStore which contains the Frame's source

_pageWrapStore

address

A FrameDataStore which contains wrappers to construct the html page container

_renderMap

uint256[4][]

A map which enables renderPage to return accurate partial html strings. The logic for generating _renderMap can be found here

setName

Sets the frame name.

Parameters

Name
Type
Description

_name

string

Name string

renderPage

Returns a partial string of the frame's html page based on a render page number out of a total number of render pages for the contract, defined by renderPagesCount.

Type
Description

string

Partial string of the frame's html page.

Last updated