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
) externalParameters
_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
_key
string
Key to query
_startPage
uint256
Start page
_endPage
uint256
End page
Return Values
uint256
getMaxPageNumber
Returns the maximum page number that exist for a key.
Parameters
_key
string
Key to query
Return Values
uint256
The highest page number that contains data
getAllDataFromPage
Get all data stored at a key starting from a specific page.
Parameters
_key
string
Key to query
_startPage
uint256
Get all data starting at this page
Return Values
bytes
The data
hasKey
Returns true if a key exists in the data store.
Parameters
string
Key to query
Return Values
bool
lock
Disables the ability to call saveData.
Last updated