aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] is `module_bundle_payload` still supported?

Open xiadd opened this issue 2 years ago • 4 comments

🐛 Bug

I read doc in https://aptos.dev/guides/interacting-with-the-aptos-blockchain/#publishing-a-new-move-module, and it says that module_bundle_payload is still working, But in this issue @jjleng said that module_bundle_payload is not supported anymore.

Additional context

And I wonder is it possible to publish a module with petra wallet? I've tried a lot but failed

xiadd avatar Nov 01 '22 02:11 xiadd

No it has been deprecated in favor of the new flow via the code module: https://aptos.dev/tutorials/first-move-module

movekevin avatar Nov 02 '22 01:11 movekevin

No it has been deprecated in favor of the new flow via the code module: https://aptos.dev/tutorials/first-move-module

Is it possible to publish a module with petra wallet?

xiadd avatar Nov 02 '22 01:11 xiadd

No I don't think it'd be supported in Petra due to needs to compile Move source code.

movekevin avatar Nov 02 '22 01:11 movekevin

No I don't think it'd be supported in Petra due to needs to compile Move source code.

I mean I already have the compiled bytecode and metadata. is it possible to send a transaction to publish with Petra?

xiadd avatar Nov 02 '22 01:11 xiadd

I think uploading module is rather low in priority for wallets. Why not use the Aptos CLI?

movekevin avatar Nov 07 '22 12:11 movekevin

I think uploading module is rather low in priority for wallets. Why not use the Aptos CLI?

We are building a online IDE for aptos, we want to all users can compile and publish aptos modules with Petra wallet. We have provided a sandbox container(intractive docker container) to compile contracts, but seems that Petra wallet cannot publish a module with bytecode.

xiadd avatar Nov 07 '22 13:11 xiadd

The concept of 'publishing a module' is not supported for Aptos Move, only publishing a package. This package must be build by the standard build process using aptos move compile. You cannot use a standalone version of the Move compiler, because there is additional metadata and post processing required for Aptos Move. That being said, if you use the aptos move compile in your docker, you should be able to extract bytecode and metadata and construct a code publish transaction for the code module. Closing for now, reopen for more questions.

wrwg avatar Nov 07 '22 16:11 wrwg