Frame
  • Overview
  • Reference
    • Deployed Contracts
    • Technical Reference
      • Frame
      • FrameDataStore
      • FrameFactory
      • FrameDataStoreFactory
    • Contract Source
      • Frame
      • FrameDataStore
      • FrameFactory
      • FrameDataStoreFactory
      • FrameDataStoreOwnable
Powered by GitBook
On this page
  • Functions
  • setLibraryAddress
  • createFrameWithSource
  1. Reference
  2. Technical Reference

FrameFactory

Functions

setLibraryAddress

Sets the library address for the factory.

function setLibraryAddress(address _libraryAddress) external

Parameters

Name
Type
Description

_libraryAddress

address

The instance of Frame.sol to use

createFrameWithSource

Deploys a new Frame contract, initializes it, sets its name, and locks the source FrameDataStore.

function createFrameWithSource(
        IFrameDataStoreFactory _frameDataStoreFactory,
        IFrame.Asset[] memory _deps,
        bytes[] calldata _newData,
        address _pageWrapStore,
        uint256[4][] calldata _renderMap,
        string calldata _name
) external returns (address)

Parameters

Name
Type
Description

_frameDataStoreFactory

IFrameDataStoreFactory

The FrameDataStoreFactory contract to use to create the Frame's new source data store

_deps

IFrame.Asset[]

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

_newData

bytes[]

An array of new data to deploy

_pageWrapStore

address

A FrameDataStore which contains wrappers to construct the html page container

_renderMap

uint256[4][]

_name

string

A name for the Frame

Return Values

Type
Description

address

The new Frame's address

PreviousFrameDataStoreNextFrameDataStoreFactory

Last updated 2 years ago

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

here