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
BaseOperation {
id: 'mitum',
fact: CreateDataFact {
hint: Hint { s: 'mitum-storage-create-data-operation-fact' },
token: Token { s: '2026-02-19 05:35:27.492 +0000 UTC' },
_hash: <Buffer 5b a0 f0 26 24 a4 bd e5 d5 23 61 9a 83 69 15 dd 3a 1a 78 58 aa ea 7b 5a 1e 79 e5 3f f1 4a bf d2>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
items: [ [CreateDataItem] ]
},
hint: Hint { s: 'mitum-storage-create-data-operation' },
_factSigns: [],
_hash: <Buffer >
}PreviousgetModelInfo(contract)NextcreateMultiData(contracts, sender, dataKeys, dataValues, currency)
Last updated