# [Ride v5] Functions for Getting Data from Account Data Storage
⚠️ This is the documentation for the Standard library version 5. We recommend to use version 6. Go to version 6
Learn more about account data storage.
Name | Description | Complexity |
---|---|---|
getBinary(Address|Alias, String): ByteVector|Unit | Gets an array of bytes by key | 10 |
getBinary(String): ByteVector|Unit | Gets an array of bytes by key from the dApp's own data storage | 10 |
getBinaryValue(Address|Alias, String): ByteVector | Gets an array of bytes by key. Fails if there is no data | 10 |
getBinaryValue(String): ByteVector | Gets an array of bytes by key from the dApp's own data storage. Fails if there is no data | 10 |
getBoolean(Address|Alias, String): Boolean|Unit | Gets a boolean value by key | 10 |
getBoolean(String): Boolean|Unit | Gets a boolean value by key from the dApp's own data storage | 10 |
getBooleanValue(Address|Alias, String): Boolean | Gets a boolean value by key. Fails if there is no data | 10 |
getBooleanValue(String): Boolean | Gets a boolean value by key from the dApp's own data storage. Fails if there is no data | 10 |
getInteger(Address|Alias, String): Int|Unit | Gets an integer by key | 10 |
getInteger(String): Int|Unit | Gets an integer by key from the dApp's own data storage | 10 |
getIntegerValue(Address|Alias, String): Int | Gets an integer by key. Fails if there is no data | 10 |
getIntegerValue(String): Int | Gets an integer by key from the dApp's own data storage. Fails if there is no data | 10 |
getString(Address|Alias, String): String|Unit | Gets a string by key | 10 |
getString(String): String|Unit | Gets a string by key from the dApp's own data storage | 10 |
getStringValue(Address|Alias, String): String | Gets a string by key. Fails if there is no data | 10 |
getStringValue(String): String | Gets a string by key from the dApp's own data storage. Fails if there is no data | 10 |
isDataStorageUntouched(Address|Alias): Boolean | Checks if the data storage of a given account never contained any entries | 10 |
# getBinary(Address|Alias, String): ByteVector|Unit
Gets an array of bytes by key.
getBinary(addressOrAlias: Address|Alias, key: String): ByteVector|Unit
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getBinary(String): ByteVector|Unit
Gets an array of bytes by key from the dApp's own data storage.
getBinary(key: String): ByteVector|Unit
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# getBinaryValue(Address|Alias, String): ByteVector
Gets an array of bytes by key. Fails if there is no data.
getBinaryValue(addressOrAlias: Address|Alias, key: String): ByteVector
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getBinaryValue(String): ByteVector
Gets an array of bytes by key from the dApp's own data storage.
getBinaryValue(key: String): ByteVector
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# getBoolean(Address|Alias, String): Boolean|Unit
Gets a boolean value by key.
getBoolean(addressOrAlias: Address|Alias, key: String): Boolean|Unit
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getBoolean(String): Boolean|Unit
Gets a boolean value by key by key from the dApp's own data storage.
getBoolean(key: String): Boolean|Unit
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# getBooleanValue(Address|Alias, String): Boolean
Gets a boolean value by key. Fails if there is no data.
getBooleanValue(addressOrAlias: Address|Alias, key: String): Boolean
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getBooleanValue(String): Boolean
Gets a boolean value by key from the dApp's own data storage.
getBooleanValue(key: String): Boolean
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# getInteger(Address|Alias, String): Int|Unit
Gets an integer by key.
getInteger(addressOrAlias: Address|Alias, key: String): Int|Unit
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getInteger(String): Int|Unit
Gets an integer by key from the dApp's own data storage.
getInteger(key: String): Int|Unit
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# getIntegerValue(Address|Alias, String): Int
Gets an integer by key. Fails if there is no data.
getIntegerValue(addressOrAlias: Address|Alias, key: String): Int
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getIntegerValue(String): Int
Gets an integer by key from the dApp's own data storage.
getIntegerValue(key: String): Int
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# getString(Address|Alias, String): String|Unit
Gets a string by key.
getString(addressOrAlias: Address|Alias, key: String): String|Unit
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getString(String): String|Unit
Gets a string by key from the dApp's own data storage.
getString(key: String): String|Unit
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# getStringValue(Address|Alias, String): String
Gets a string by key. Fails if there is no data.
getStringValue(addressOrAlias: Address|Alias, key: String): String
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
key : String | Entry key |
# getStringValue(String): String
Gets a string by key from the dApp's own data storage.
getStringValue(key: String): String
# Parameters
Parameter | Description |
---|---|
key : String | Entry key |
# isDataStorageUntouched(Address|Alias): Boolean
Checks if the data storage of a given account never contained any entries.
Returns false
if there was at least one entry in the account data storage even if the entry was deleted.
isDataStorageUntouched(addressOrAlias: Address|Alias): Boolean
# Parameters
Parameter | Description |
---|---|
addressOrAlias : Address|Alias | Address or alias of the account |
# Example
let addr = Address(base58'3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU')
isDataStorageUntouched(addr) # Returns false