How to generate Program base64 byte code from Move script

I can compile the payment script at language/stdlib/transaction_scripts/peer_to_peer_transfer.mvir to base64 using:

./compiler ../../language/stdlib/transaction_scripts/peer_to_peer_transfer.mvir | base64 --wrap=0

The problem is the byte code is then rejected by the Libra transaction validator and it also doesn’t look anything like the Program bytecode from a verified payment transaction.

How can the correct base64 byte code be generated from the peer_to_peer_transfer.mvir script?

1 Like