View Source: contracts/datastore/DataStore.sol
↗ Extends: DataStoreStorage, IDataStore
DataStore
Events
event SecurityTokenChanged(address indexed _oldSecurityToken, address indexed _newSecurityToken);
validKey
modifier validKey(bytes32 _key) internal
Arguments
Name | Type | Description |
_key | bytes32 | |
modifier validArrayLength(uint256 _keyLength, uint256 _dataLength) internal
Arguments
Name | Type | Description |
_keyLength | uint256 | |
_dataLength | uint256 | |
modifier onlyOwner() internal
Arguments
Name | Type | Description |
function _isAuthorized() internal view
Arguments
Name | Type | Description |
⤾ overrides IDataStore.setSecurityToken
Changes security token atatched to this data store
function setSecurityToken(address _securityToken) external nonpayable onlyOwner
Arguments
Name | Type | Description |
_securityToken | address | address of the security token |
⤾ overrides IDataStore.setUint256
Stores a uint256 data against a key
function setUint256(bytes32 _key, uint256 _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | Unique key to identify the data |
_data | uint256 | Data to be stored against the key |
⤾ overrides IDataStore.setBytes32
function setBytes32(bytes32 _key, bytes32 _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bytes32 | |
⤾ overrides IDataStore.setAddress
function setAddress(bytes32 _key, address _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | address | |
⤾ overrides IDataStore.setBool
function setBool(bytes32 _key, bool _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bool | |
⤾ overrides IDataStore.setString
function setString(bytes32 _key, string _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | string | |
⤾ overrides IDataStore.setBytes
function setBytes(bytes32 _key, bytes _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bytes | |
⤾ overrides IDataStore.setUint256Array
Stores a uint256 array against a key
function setUint256Array(bytes32 _key, uint256[] _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | Unique key to identify the array |
_data | uint256[] | Array to be stored against the key |
⤾ overrides IDataStore.setBytes32Array
function setBytes32Array(bytes32 _key, bytes32[] _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bytes32[] | |
⤾ overrides IDataStore.setAddressArray
function setAddressArray(bytes32 _key, address[] _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | address[] | |
⤾ overrides IDataStore.setBoolArray
function setBoolArray(bytes32 _key, bool[] _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bool[] | |
⤾ overrides IDataStore.insertUint256
Inserts a uint256 element to the array identified by the key
function insertUint256(bytes32 _key, uint256 _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | Unique key to identify the array |
_data | uint256 | Element to push into the array |
⤾ overrides IDataStore.insertBytes32
function insertBytes32(bytes32 _key, bytes32 _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bytes32 | |
⤾ overrides IDataStore.insertAddress
function insertAddress(bytes32 _key, address _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | address | |
⤾ overrides IDataStore.insertBool
function insertBool(bytes32 _key, bool _data) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bool | |
⤾ overrides IDataStore.deleteUint256
Deletes an element from the array identified by the key. When an element is deleted from an Array, last element of that array is moved to the index of deleted element.
function deleteUint256(bytes32 _key, uint256 _index) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | Unique key to identify the array |
_index | uint256 | Index of the element to delete |
⤾ overrides IDataStore.deleteBytes32
function deleteBytes32(bytes32 _key, uint256 _index) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
⤾ overrides IDataStore.deleteAddress
function deleteAddress(bytes32 _key, uint256 _index) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
⤾ overrides IDataStore.deleteBool
function deleteBool(bytes32 _key, uint256 _index) external nonpayable
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
⤾ overrides IDataStore.setUint256Multi
Stores multiple uint256 data against respective keys
function setUint256Multi(bytes32[] _keys, uint256[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | Array of keys to identify the data |
_data | uint256[] | Array of data to be stored against the respective keys |
⤾ overrides IDataStore.setBytes32Multi
function setBytes32Multi(bytes32[] _keys, bytes32[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | |
_data | bytes32[] | |
⤾ overrides IDataStore.setAddressMulti
function setAddressMulti(bytes32[] _keys, address[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | |
_data | address[] | |
⤾ overrides IDataStore.setBoolMulti
function setBoolMulti(bytes32[] _keys, bool[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | |
_data | bool[] | |
⤾ overrides IDataStore.insertUint256Multi
Inserts multiple uint256 elements to the array identified by the respective keys
function insertUint256Multi(bytes32[] _keys, uint256[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | Array of keys to identify the data |
_data | uint256[] | Array of data to be inserted in arrays of the respective keys |
⤾ overrides IDataStore.insertBytes32Multi
function insertBytes32Multi(bytes32[] _keys, bytes32[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | |
_data | bytes32[] | |
⤾ overrides IDataStore.insertAddressMulti
function insertAddressMulti(bytes32[] _keys, address[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | |
_data | address[] | |
⤾ overrides IDataStore.insertBoolMulti
function insertBoolMulti(bytes32[] _keys, bool[] _data) public nonpayable validArrayLength
Arguments
Name | Type | Description |
_keys | bytes32[] | |
_data | bool[] | |
⤾ overrides IDataStore.getUint256
function getUint256(bytes32 _key) external viewreturns(uint256)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getBytes32
function getBytes32(bytes32 _key) external viewreturns(bytes32)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getAddress
function getAddress(bytes32 _key) external viewreturns(address)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getString
function getString(bytes32 _key) external viewreturns(string)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getBytes
function getBytes(bytes32 _key) external viewreturns(bytes)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getBool
function getBool(bytes32 _key) external viewreturns(bool)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getUint256Array
function getUint256Array(bytes32 _key) external viewreturns(uint256[])
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getBytes32Array
function getBytes32Array(bytes32 _key) external viewreturns(bytes32[])
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getAddressArray
function getAddressArray(bytes32 _key) external viewreturns(address[])
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getBoolArray
function getBoolArray(bytes32 _key) external viewreturns(bool[])
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getUint256ArrayLength
function getUint256ArrayLength(bytes32 _key) external viewreturns(uint256)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getBytes32ArrayLength
function getBytes32ArrayLength(bytes32 _key) external viewreturns(uint256)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getAddressArrayLength
function getAddressArrayLength(bytes32 _key) external viewreturns(uint256)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getBoolArrayLength
function getBoolArrayLength(bytes32 _key) external viewreturns(uint256)
Arguments
Name | Type | Description |
_key | bytes32 | |
⤾ overrides IDataStore.getUint256ArrayElement
function getUint256ArrayElement(bytes32 _key, uint256 _index) external viewreturns(uint256)
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
⤾ overrides IDataStore.getBytes32ArrayElement
function getBytes32ArrayElement(bytes32 _key, uint256 _index) external viewreturns(bytes32)
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
⤾ overrides IDataStore.getAddressArrayElement
function getAddressArrayElement(bytes32 _key, uint256 _index) external viewreturns(address)
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
⤾ overrides IDataStore.getBoolArrayElement
function getBoolArrayElement(bytes32 _key, uint256 _index) external viewreturns(bool)
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
⤾ overrides IDataStore.getUint256ArrayElements
function getUint256ArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public viewreturns(array uint256[])
Arguments
Name | Type | Description |
_key | bytes32 | |
_startIndex | uint256 | |
_endIndex | uint256 | |
⤾ overrides IDataStore.getBytes32ArrayElements
function getBytes32ArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public viewreturns(array bytes32[])
Arguments
Name | Type | Description |
_key | bytes32 | |
_startIndex | uint256 | |
_endIndex | uint256 | |
⤾ overrides IDataStore.getAddressArrayElements
function getAddressArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public viewreturns(array address[])
Arguments
Name | Type | Description |
_key | bytes32 | |
_startIndex | uint256 | |
_endIndex | uint256 | |
⤾ overrides IDataStore.getBoolArrayElements
function getBoolArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public viewreturns(array bool[])
Arguments
Name | Type | Description |
_key | bytes32 | |
_startIndex | uint256 | |
_endIndex | uint256 | |
function _setData(bytes32 _key, uint256 _data, bool _insert) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | uint256 | |
_insert | bool | |
function _setData(bytes32 _key, bytes32 _data, bool _insert) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bytes32 | |
_insert | bool | |
function _setData(bytes32 _key, address _data, bool _insert) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | address | |
_insert | bool | |
function _setData(bytes32 _key, bool _data, bool _insert) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bool | |
_insert | bool | |
function _setData(bytes32 _key, string _data) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | string | |
function _setData(bytes32 _key, bytes _data) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bytes | |
function _setData(bytes32 _key, uint256[] _data) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | uint256[] | |
function _setData(bytes32 _key, bytes32[] _data) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bytes32[] | |
function _setData(bytes32 _key, address[] _data) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | address[] | |
function _setData(bytes32 _key, bool[] _data) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_data | bool[] | |
function _deleteUint(bytes32 _key, uint256 _index) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
function _deleteBytes32(bytes32 _key, uint256 _index) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
function _deleteAddress(bytes32 _key, uint256 _index) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |
function _deleteBool(bytes32 _key, uint256 _index) internal nonpayable validKey
Arguments
Name | Type | Description |
_key | bytes32 | |
_index | uint256 | |