getData(contract, dataKey)
Feature
Get current state of the data with certain dataKey
Parameters
string
contract address,
string
dataKey
data
of SuccessResponse
object
current information of certain data
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const dataKey = "server_access_record"
// Note: an asynchronous request.
const dataInfo = async () => {
const info = await mitum.storage.getData(contractAddress, dataKey);
console.log(info.data);
};
dataInfo();
//output
{
data: {
_hint: 'mitum-storage-data-v0.0.1',
dataKey: 'server_access_record',
dataValue: '2024-08-21 09:15:32 - John Doe entered the main office through the front entrance',
deleted: false
},
height: 11,
operation: '4SZ8geDvZ5JajqLnqbySdB9VFXx28qtmCxUCmycLGciJ',
timestamp: '2024-08-22T06:38:53.480539Z'
}
PreviouscreateMultiData(contracts, sender, dataKeys, dataValues, currency)NextupdateData(contract, sender, dataKey, dataValue, currency)
Last updated