Can't find CreateAccount transaction bytecode

Anybody know how I can get the transaction bytecode of the CreateAccount.mvir I know that a Account is created when a transaction is made to a not existent account or when you mint to a not existent account.

But how I can call the createAccount.mvir directly ? If that is possible.

Thanks in advance!

Diego.-

1 Like

If you run

./target/debug/compiler language/stdlib/transaction_scripts/create_account.mvir -o create_account.mv

from the root of the libra directory, the bytecode for the create account script will be dumped into create_account.mv.

You can then package this bytecode into a transaction. Unfortunately, the client doesn’t have a special command to do this at the moment (unlike p2p payment and minting).

2 Likes

You have source code of all standard transactions as well:

(from your libra root)
language/stdlib/transaction_scripts/mint.mvir
language/stdlib/transaction_scripts/create_account.mvir
language/stdlib/transaction_scripts/rotate_authentication_key.mvir
language/stdlib/transaction_scripts/peer_to_peer_transfer.mvir
language/stdlib/transaction_scripts/placeholder_script.mvir

1 Like

Thanks for you anwser, but the real question is how I can generate the bytecode?

Thanks for you reply! I will try this, thanks!

you can compile to Move bytecode this way after having downloaded and built the libra project:

[PROJECT_DIR]/libra/target/debug/compiler --output [OUTPUT_DIR]/xxx.mvbc [INPUT_DIR]/xxx.mvir. (xxx.mvir being a Move IR file)

1 Like

Is there a change that the target folder doesn’t exist anymore ?