publishPackageTransaction

open suspend override fun publishPackageTransaction(account: AccountAddressInput, metadataBytes: HexInput, moduleBytecode: List<HexInput>, options: InputGenerateTransactionOptions): SimpleTransaction

Generates a transaction to publish a move package to chain.

To get the metadataBytes and byteCode, can compile using Aptos CLI with command aptos move compile --save-metadata ...,

Parameters

account

The publisher account

metadataBytes

The package metadata bytes

moduleBytecode

An array of the bytecode of each module in the package in compiler output order