0

Stellar newbie here, using the ZuluCrypto PHP SDK. I can successfully submit this transaction:

$transaction = Server::testNet()
    ->buildTransaction(xxx_Account_A_xxx)
    ->addCustomAssetPaymentOp($asset, $amount, xxx_Account_B_xxx)
    ->setMemo( new Memo(3, 'DEADMEATDEADMEATDEADMEATDEADMEAT'));

(3 is the MEMO_TYPE for a 32 byte hash.) But then transaction record retrieved from horizon-testnet shows the memo as REVBRE1FQVRERUFETUVBVERFQURNRUFUREVBRE1FQVQ= (with the correct memo_type 3), and the Stellar Lab XDR viewer won't decode this as a "Memo" or anything else.

How do I set a memo and then retrieve that memo from the transaction record?

1

The memo value returned by Horizon is base64 encoded. You can decode the value with base64_decode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.