Skip to main content

ERC725YFacet

ERC725YFacet

Contract module which provides the ability to set arbitrary data key/value pairs that can be changed over time It is intended to standardise certain data key/value pairs to allow automated read and writes from/to the contract storage

getData

function getData(bytes32 dataKey) public view virtual returns (bytes dataValue)

Gets singular data at a given dataKey

Parameters

NameTypeDescription
dataKeybytes32The key which value to retrieve

Return Values

NameTypeDescription
dataValuebytesThe data stored at the key

getData

function getData(bytes32[] dataKeys) public view virtual returns (bytes[] dataValues)

Gets array of data for multiple given keys

Parameters

NameTypeDescription
dataKeysbytes32[]The array of keys which values to retrieve

Return Values

NameTypeDescription
dataValuesbytes[]The array of data stored at multiple keys

setData

function setData(bytes32 dataKey, bytes dataValue) public

TODO fix only OWNER

Parameters

NameTypeDescription
dataKeybytes32The key to retrieve stored value
dataValuebytesThe value to set SHOULD only be callable by the owner of the contract set via ERC173 Emits a {DataChanged} event.

setData

function setData(bytes32[] dataKeys, bytes[] dataValues) public

_Sets array of data for multiple given dataKeys SHOULD only be callable by the owner of the contract set via ERC173

Emits a {DataChanged} event._

Parameters

NameTypeDescription
dataKeysbytes32[]The array of data keys for values to set
dataValuesbytes[]The array of values to set

_getData

function _getData(bytes32 dataKey) internal view virtual returns (bytes dataValue)

_setData

function _setData(bytes32 dataKey, bytes dataValue) internal virtual

_uncheckedIncrement

function _uncheckedIncrement(uint256 i) internal pure returns (uint256)

Will return unchecked incremented uint256 can be used to save gas when iterating over loops

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)

See {IERC165-supportsInterface}.

_msgSender

function _msgSender() internal view returns (address sender)

onlyOwner

modifier onlyOwner()