How to send blob value form dfx cli?

Motoko Code

public type Memo = Blob;

public shared(msg) func send_memo(from: Principal, to: Principal, value: Nat,memo: Memo) : async TxReceipt
// Store the memo as Blob.toArray(memo);

deploying as memo_can
How i can call this in the dfx cli - command line ?

String memo i want to send : “Bill Payment” and “Cash Receipt”

How to send from dfx cli ? to the canister calling the send_memo function ?

Appreciate your reply. Thanks

1 Like
dfx canister call memo_can send_memo 
'(principal "some-principal", principal "other-principal", blob "binary-data")'

I use IC-Py to interface with my canisters. Python made it a lot easier for me to work with Blobs.

1 Like

Thank you for your reply.

How to convert “Bill Payment” to binary data in shell script ?