From f3d9618266e593e5da79581dd297afed44f1772d Mon Sep 17 00:00:00 2001 From: ganymedio <17599867+ganymedio@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:52:09 -0400 Subject: [PATCH 1/3] feat(cli): default chunked-publish large_packages address on Movement `default_large_packages_module_address` resolved the `large_packages` module address from the chain ID but had no Movement branch, so on Movement mainnet/testnet it fell through to the localnet/devnet default (0x7), which has no such module deployed. Every chunked publish therefore required passing `--large-packages-module-address` by hand. Add a Movement branch pointing at the audited `large_packages` deployment at 0x5535c0246b3da2a0632edc13bac62aa352a9829adc2e060ed227955457aa9f06, published to the same account on Movement mainnet and testnet so one constant covers both networks. Update the `--large-packages-module-address` flag doc to describe the chain-id-based resolution. --- aptos-move/framework/src/chunked_publish.rs | 4 ++-- crates/aptos/src/common/types.rs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aptos-move/framework/src/chunked_publish.rs b/aptos-move/framework/src/chunked_publish.rs index 3eeaff36a88..3d694cd84a2 100644 --- a/aptos-move/framework/src/chunked_publish.rs +++ b/aptos-move/framework/src/chunked_publish.rs @@ -10,7 +10,7 @@ use move_core_types::{account_address::AccountAddress, ident_str, language_stora /// The default address where the `large_packages.move` module is deployed. /// This address is used on both mainnet and testnet. pub const LARGE_PACKAGES_PROD_MODULE_ADDRESS: &str = - "0x0e1ca3011bdd07246d4d16d909dbb2d6953a86c4735d5acf5865d962c630cce7"; + "0x5535c0246b3da2a0632edc13bac62aa352a9829adc2e060ed227955457aa9f06"; /// Address where large packages module is deployed on dev network started from genesis /// (including devnet and localnet) @@ -26,7 +26,7 @@ pub enum PublishType { } pub fn default_large_packages_module_address(chain_id: &ChainId) -> &'static str { - if chain_id.is_mainnet() || chain_id.is_testnet() { + if chain_id.is_movement_mainnet() || chain_id.is_movement_testnet() { LARGE_PACKAGES_PROD_MODULE_ADDRESS } else { LARGE_PACKAGES_DEV_MODULE_ADDRESS diff --git a/crates/aptos/src/common/types.rs b/crates/aptos/src/common/types.rs index 493ef23057c..65c78502bcd 100644 --- a/crates/aptos/src/common/types.rs +++ b/crates/aptos/src/common/types.rs @@ -2499,10 +2499,8 @@ pub struct OverrideSizeCheckOption { pub struct LargePackagesModuleOption { /// Address of the `large_packages` move module for chunked publishing /// - /// By default, on the module is published at `0x0e1ca3011bdd07246d4d16d909dbb2d6953a86c4735d5acf5865d962c630cce7` - /// on Testnet and Mainnet, and `0x7` on localnest/devnet. - /// On any custom network where neither is used, you will need to first publish it from the framework - /// under move-examples/large_packages. + /// Defaults to `0x5535c0246b3da2a0632edc13bac62aa352a9829adc2e060ed227955457aa9f06` + /// on mainnet and testnet. #[clap(long, value_parser = crate::common::types::load_account_arg)] pub(crate) large_packages_module_address: Option, } From 0d3a2d18435f07b5624fb243ef25caf16b5cd497 Mon Sep 17 00:00:00 2001 From: ganymedio <17599867+ganymedio@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:48:12 -0400 Subject: [PATCH 2/3] fix(chunked deployment): update clear staging area comment to use movement cli --- crates/aptos/src/move_tool/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/aptos/src/move_tool/mod.rs b/crates/aptos/src/move_tool/mod.rs index 78b6b34b4a7..838d9ea0079 100644 --- a/crates/aptos/src/move_tool/mod.rs +++ b/crates/aptos/src/move_tool/mod.rs @@ -1659,7 +1659,7 @@ async fn submit_chunked_publish_transactions( let message = format!( "The resource {}::large_packages::StagingArea under account {} is not empty.\ \nThis may cause package publishing to fail if the data is unexpected. \ - \nUse the `aptos move clear-staging-area` command to clean up the `StagingArea` resource under the account.", + \nUse the `movement move clear-staging-area` command to clean up the `StagingArea` resource under the account.", large_packages_module_address, account_address, ) .bold(); @@ -1693,7 +1693,7 @@ async fn submit_chunked_publish_transactions( println!("{}", "Caution: An error occurred while submitting chunked publish transactions. \ \nDue to this error, there may be incomplete data left in the `StagingArea` resource. \ \nThis could cause further errors if you attempt to run the chunked publish command again. \ - \nTo avoid this, use the `aptos move clear-staging-area` command to clean up the `StagingArea` resource under your account before retrying.".bold()); + \nTo avoid this, use the `movement move clear-staging-area` command to clean up the `StagingArea` resource under your account before retrying.".bold()); return Err(e); }, } From 7fff02abe82e82b7463c6247f66f75da862fff9e Mon Sep 17 00:00:00 2001 From: ganymedio <17599867+ganymedio@users.noreply.github.com> Date: Mon, 6 Jul 2026 10:50:18 -0400 Subject: [PATCH 3/3] fix(chunked-publish): gate on is_mainnet/is_testnet #391 removes is_movement_mainnet()/is_movement_testnet() and repoints is_mainnet()/is_testnet() at Movement's chain IDs, so the plain predicates now select the Movement large_packages address. --- aptos-move/framework/src/chunked_publish.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aptos-move/framework/src/chunked_publish.rs b/aptos-move/framework/src/chunked_publish.rs index 3d694cd84a2..065ff3d57e8 100644 --- a/aptos-move/framework/src/chunked_publish.rs +++ b/aptos-move/framework/src/chunked_publish.rs @@ -26,7 +26,7 @@ pub enum PublishType { } pub fn default_large_packages_module_address(chain_id: &ChainId) -> &'static str { - if chain_id.is_movement_mainnet() || chain_id.is_movement_testnet() { + if chain_id.is_mainnet() || chain_id.is_testnet() { LARGE_PACKAGES_PROD_MODULE_ADDRESS } else { LARGE_PACKAGES_DEV_MODULE_ADDRESS