FrameDataStore

An immutable on-chain key-value data store that holds browser code.

Functions

saveData

Stores data for a key at a specific page number. Pages cannot be overwritten if data already exists.

function saveData(
        string memory _key,
        uint128 _pageNumber,
        bytes memory _b
) external

Parameters

Name
Type
Description

_key

string

Key to save new data to

_pageNumber

uint128

The page number to save to

_b

bytes

The data

getSizeBetweenPages

Returns the byte size of data stored between two pages for a given key.

function getSizeBetweenPages(
        string memory _key,
        uint256 _startPage,
        uint256 _endPage
) external view returns (uint256)

Parameters

Name
Type
Description

_key

string

Key to query

_startPage

uint256

Start page

_endPage

uint256

End page

Return Values

Type
Description

uint256

getMaxPageNumber

Returns the maximum page number that exist for a key.

Parameters

Name
Type
Description

_key

string

Key to query

Return Values

Type
Description

uint256

The highest page number that contains data

getAllDataFromPage

Get all data stored at a key starting from a specific page.

Parameters

Name
Type
Description

_key

string

Key to query

_startPage

uint256

Get all data starting at this page

Return Values

Type
Description

bytes

The data

hasKey

Returns true if a key exists in the data store.

Parameters

Type

string

Key to query

Return Values

Type

bool

lock

Disables the ability to call saveData.

Last updated