Data store contract that stores data for all the modules in a central contract. (DataStore.sol)

View Source: contracts/datastore/DataStore.solโ€‹

โ†— Extends: DataStoreStorage, IDataStoreโ€‹

DataStore

Events

event SecurityTokenChanged(address indexed _oldSecurityToken, address indexed _newSecurityToken);

Modifiers

validKey

modifier validKey(bytes32 _key) internal

Arguments

Name

Type

Description

_key

bytes32

โ€‹

validArrayLength

modifier validArrayLength(uint256 _keyLength, uint256 _dataLength) internal

Arguments

Name

Type

Description

_keyLength

uint256

โ€‹

_dataLength

uint256

โ€‹

onlyOwner

modifier onlyOwner() internal

Arguments

Name

Type

Description

Functions

_isAuthorized

function _isAuthorized() internal view

Arguments

Name

Type

Description

setSecurityToken

โคพ 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

setUint256

โคพ 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

setBytes32

โคพ overrides IDataStore.setBytes32โ€‹

function setBytes32(bytes32 _key, bytes32 _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bytes32

โ€‹

setAddress

โคพ overrides IDataStore.setAddressโ€‹

function setAddress(bytes32 _key, address _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

address

โ€‹

setBool

โคพ overrides IDataStore.setBoolโ€‹

function setBool(bytes32 _key, bool _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bool

โ€‹

setString

โคพ overrides IDataStore.setStringโ€‹

function setString(bytes32 _key, string _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

string

โ€‹

setBytes

โคพ overrides IDataStore.setBytesโ€‹

function setBytes(bytes32 _key, bytes _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bytes

โ€‹

setUint256Array

โคพ 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

setBytes32Array

โคพ overrides IDataStore.setBytes32Arrayโ€‹

function setBytes32Array(bytes32 _key, bytes32[] _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bytes32[]

โ€‹

setAddressArray

โคพ overrides IDataStore.setAddressArrayโ€‹

function setAddressArray(bytes32 _key, address[] _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

address[]

โ€‹

setBoolArray

โคพ overrides IDataStore.setBoolArrayโ€‹

function setBoolArray(bytes32 _key, bool[] _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bool[]

โ€‹

insertUint256

โคพ 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

insertBytes32

โคพ overrides IDataStore.insertBytes32โ€‹

function insertBytes32(bytes32 _key, bytes32 _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bytes32

โ€‹

insertAddress

โคพ overrides IDataStore.insertAddressโ€‹

function insertAddress(bytes32 _key, address _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

address

โ€‹

insertBool

โคพ overrides IDataStore.insertBoolโ€‹

function insertBool(bytes32 _key, bool _data) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bool

โ€‹

deleteUint256

โคพ 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

deleteBytes32

โคพ overrides IDataStore.deleteBytes32โ€‹

function deleteBytes32(bytes32 _key, uint256 _index) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

deleteAddress

โคพ overrides IDataStore.deleteAddressโ€‹

function deleteAddress(bytes32 _key, uint256 _index) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

deleteBool

โคพ overrides IDataStore.deleteBoolโ€‹

function deleteBool(bytes32 _key, uint256 _index) external nonpayable

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

setUint256Multi

โคพ 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

setBytes32Multi

โคพ overrides IDataStore.setBytes32Multiโ€‹

function setBytes32Multi(bytes32[] _keys, bytes32[] _data) public nonpayable validArrayLength

Arguments

Name

Type

Description

_keys

bytes32[]

โ€‹

_data

bytes32[]

โ€‹

setAddressMulti

โคพ overrides IDataStore.setAddressMultiโ€‹

function setAddressMulti(bytes32[] _keys, address[] _data) public nonpayable validArrayLength

Arguments

Name

Type

Description

_keys

bytes32[]

โ€‹

_data

address[]

โ€‹

setBoolMulti

โคพ overrides IDataStore.setBoolMultiโ€‹

function setBoolMulti(bytes32[] _keys, bool[] _data) public nonpayable validArrayLength

Arguments

Name

Type

Description

_keys

bytes32[]

โ€‹

_data

bool[]

โ€‹

insertUint256Multi

โคพ 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

insertBytes32Multi

โคพ overrides IDataStore.insertBytes32Multiโ€‹

function insertBytes32Multi(bytes32[] _keys, bytes32[] _data) public nonpayable validArrayLength

Arguments

Name

Type

Description

_keys

bytes32[]

โ€‹

_data

bytes32[]

โ€‹

insertAddressMulti

โคพ overrides IDataStore.insertAddressMultiโ€‹

function insertAddressMulti(bytes32[] _keys, address[] _data) public nonpayable validArrayLength

Arguments

Name

Type

Description

_keys

bytes32[]

โ€‹

_data

address[]

โ€‹

insertBoolMulti

โคพ overrides IDataStore.insertBoolMultiโ€‹

function insertBoolMulti(bytes32[] _keys, bool[] _data) public nonpayable validArrayLength

Arguments

Name

Type

Description

_keys

bytes32[]

โ€‹

_data

bool[]

โ€‹

getUint256

โคพ overrides IDataStore.getUint256โ€‹

function getUint256(bytes32 _key) external view
returns(uint256)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getBytes32

โคพ overrides IDataStore.getBytes32โ€‹

function getBytes32(bytes32 _key) external view
returns(bytes32)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getAddress

โคพ overrides IDataStore.getAddressโ€‹

function getAddress(bytes32 _key) external view
returns(address)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getString

โคพ overrides IDataStore.getStringโ€‹

function getString(bytes32 _key) external view
returns(string)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getBytes

โคพ overrides IDataStore.getBytesโ€‹

function getBytes(bytes32 _key) external view
returns(bytes)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getBool

โคพ overrides IDataStore.getBoolโ€‹

function getBool(bytes32 _key) external view
returns(bool)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getUint256Array

โคพ overrides IDataStore.getUint256Arrayโ€‹

function getUint256Array(bytes32 _key) external view
returns(uint256[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getBytes32Array

โคพ overrides IDataStore.getBytes32Arrayโ€‹

function getBytes32Array(bytes32 _key) external view
returns(bytes32[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getAddressArray

โคพ overrides IDataStore.getAddressArrayโ€‹

function getAddressArray(bytes32 _key) external view
returns(address[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getBoolArray

โคพ overrides IDataStore.getBoolArrayโ€‹

function getBoolArray(bytes32 _key) external view
returns(bool[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getUint256ArrayLength

โคพ overrides IDataStore.getUint256ArrayLengthโ€‹

function getUint256ArrayLength(bytes32 _key) external view
returns(uint256)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getBytes32ArrayLength

โคพ overrides IDataStore.getBytes32ArrayLengthโ€‹

function getBytes32ArrayLength(bytes32 _key) external view
returns(uint256)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getAddressArrayLength

โคพ overrides IDataStore.getAddressArrayLengthโ€‹

function getAddressArrayLength(bytes32 _key) external view
returns(uint256)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getBoolArrayLength

โคพ overrides IDataStore.getBoolArrayLengthโ€‹

function getBoolArrayLength(bytes32 _key) external view
returns(uint256)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

getUint256ArrayElement

โคพ overrides IDataStore.getUint256ArrayElementโ€‹

function getUint256ArrayElement(bytes32 _key, uint256 _index) external view
returns(uint256)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

getBytes32ArrayElement

โคพ overrides IDataStore.getBytes32ArrayElementโ€‹

function getBytes32ArrayElement(bytes32 _key, uint256 _index) external view
returns(bytes32)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

getAddressArrayElement

โคพ overrides IDataStore.getAddressArrayElementโ€‹

function getAddressArrayElement(bytes32 _key, uint256 _index) external view
returns(address)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

getBoolArrayElement

โคพ overrides IDataStore.getBoolArrayElementโ€‹

function getBoolArrayElement(bytes32 _key, uint256 _index) external view
returns(bool)

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

getUint256ArrayElements

โคพ overrides IDataStore.getUint256ArrayElementsโ€‹

function getUint256ArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public view
returns(array uint256[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_startIndex

uint256

โ€‹

_endIndex

uint256

โ€‹

getBytes32ArrayElements

โคพ overrides IDataStore.getBytes32ArrayElementsโ€‹

function getBytes32ArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public view
returns(array bytes32[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_startIndex

uint256

โ€‹

_endIndex

uint256

โ€‹

getAddressArrayElements

โคพ overrides IDataStore.getAddressArrayElementsโ€‹

function getAddressArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public view
returns(array address[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_startIndex

uint256

โ€‹

_endIndex

uint256

โ€‹

getBoolArrayElements

โคพ overrides IDataStore.getBoolArrayElementsโ€‹

function getBoolArrayElements(bytes32 _key, uint256 _startIndex, uint256 _endIndex) public view
returns(array bool[])

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_startIndex

uint256

โ€‹

_endIndex

uint256

โ€‹

_setData

function _setData(bytes32 _key, uint256 _data, bool _insert) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

uint256

โ€‹

_insert

bool

โ€‹

_setData

function _setData(bytes32 _key, bytes32 _data, bool _insert) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bytes32

โ€‹

_insert

bool

โ€‹

_setData

function _setData(bytes32 _key, address _data, bool _insert) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

address

โ€‹

_insert

bool

โ€‹

_setData

function _setData(bytes32 _key, bool _data, bool _insert) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bool

โ€‹

_insert

bool

โ€‹

_setData

function _setData(bytes32 _key, string _data) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

string

โ€‹

_setData

function _setData(bytes32 _key, bytes _data) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bytes

โ€‹

_setData

function _setData(bytes32 _key, uint256[] _data) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

uint256[]

โ€‹

_setData

function _setData(bytes32 _key, bytes32[] _data) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bytes32[]

โ€‹

_setData

function _setData(bytes32 _key, address[] _data) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

address[]

โ€‹

_setData

function _setData(bytes32 _key, bool[] _data) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_data

bool[]

โ€‹

_deleteUint

function _deleteUint(bytes32 _key, uint256 _index) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

_deleteBytes32

function _deleteBytes32(bytes32 _key, uint256 _index) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

_deleteAddress

function _deleteAddress(bytes32 _key, uint256 _index) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹

_deleteBool

function _deleteBool(bytes32 _key, uint256 _index) internal nonpayable validKey

Arguments

Name

Type

Description

_key

bytes32

โ€‹

_index

uint256

โ€‹