🖱️Data Processing-action Serialization
action serialization
const client = await getClient();
const contract = await client.contract("testmulsign1");
const data = {
issuer: "testmulsign1",
wallet_id: "0",
mulsigner: "solo11111111",
weight: 1,
};
// 102673386a99b1ca000000000000000010420821844023c501000000
const hex = contract.fc
.toBuffer(
"setmulsigner", // Contract method
data,
)
.toString("hex");action deserialization
const client = await getClient();
const contract = await client.contract("testmulsign1");
// {issuer: "testmulsign1", wallet_id: "0", mulsigner: "solo11111111", weight: 1}
const data = contract.fc.fromBuffer(
"setmulsigner", // Contract method
Buffer.from(
// Serialized string corresponding to method
"102673386a99b1ca000000000000000010420821844023c501000000",
"hex",
),
);Last updated