Include messages inside ICP transactions

Hi, I wonder if there’s a way to include messages inside ICP token transactions, like you can do it in ETH transactions, where you can put data (HEX code) inside a transaction, which will be carved into the blockchain forever. For example, there could be data about the purpose of the transaction, or a quote to someone, etc.

1 Like

You can add a memo (Nat64)

That you can pass to any transaction; then use notify_dfx ( https://github.com/dfinity/nns-ifaces/blob/master/ledger.did#L68 ) to emit the transaction information (example of use case: Marketplace that generates an unique Order ID (Nat64), you pay and pass the Order ID as a memo; then notify the Marketplace canister of this transaction - which execute the order after checking the ICPts amount & co )

2 Likes

Example : https://dashboard.internetcomputer.org/transaction/52237558b5fa944b2400d8f6d718f2f9cb3231bd3b00d46d4e4adfe3a76358eb

Memo is 18414336472216572408

mmm, thanks for your response, but I don’t think this is what I was asking for. I’ve seen memo, but you can include just numbers there, not some other data. As I’ve mentioned, in ETH transactions you could include some text HEX encoded, where you could write a message.

1 Like

var args = {
“block_height” : result.height,
“max_fee”: {“e8s”: 1_000_0},
“from_subaccount”:,
“to_subaccount”: ,
“to_canister”: Principal.fromText(“ezu5f-pqaaa-aaaaf-qaeba-cai”)
};

let result = await ledgerActor.notify_dfx(args);

Here
“from_subaccount”:,
“to_subaccount”: ,

What these params takes as value? When i send account or principal it is giving error?

1 Like