createData(contract, sender, dataKey, dataValue, currency)
const contract = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const dataKey = "server_access_record"
const dataValue = "2024-08-21 09:15:32 - John Doe entered the main office through the front entrance"
const currencyId = "MCC";
const createDataOperation = mitum.storage.createData(contract, sender, dataKey, dataValue, currencyId);
console.log(createDataOperation);
// output
Operation {
id: 'mitum',
fact: CreateDataFact {
hint: Hint { s: 'mitum-storage-create-data-operation-fact' },
token: Token { s: '2024-08-22 06:03:37.068 +0000 UTC' },
_hash: <Buffer ed 74 ca 10 9e c1 73 15 80 74 26 97 16 50 55 9e d9 63 13 a3 3f 2b 21 11 52 5e 70 6d 59 c9 76 99>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
contract: Address {
s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
dataKey: LongString { s: 'server_access_record' },
dataValue: LongString {
s: '2024-08-21 09:15:32 - John Doe entered the main office through the front entrance'
}
},
hint: Hint { s: 'mitum-storage-create-data-operation' },
_factSigns: [],
_hash: <Buffer >
}PreviousgetModelInfo(contract)NextcreateMultiData(contracts, sender, dataKeys, dataValues, currency)
Last updated