Skip to content

Commit

Permalink
Use package_id from generate_package_id
Browse files Browse the repository at this point in the history
  • Loading branch information
666lcz committed Mar 1, 2022
1 parent 56ac0ee commit 6a095af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sui/src/sui_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ pub async fn genesis(
for path in genesis_conf.move_packages {
let mut modules =
sui_framework::build_move_package(&path, BuildConfig::default(), false)?;
generate_package_id(
let package_id = generate_package_id(
&mut modules,
&mut TxContext::new(&SuiAddress::default(), TransactionDigest::genesis()),
)?;

let object = Object::new_package(modules, TransactionDigest::genesis());
info!("Loaded package [{}] from {:?}.", object.id(), path);
// Writing package id to network.conf for user to retrieve later.
config.loaded_move_packages.push((path, object.id()));
config.loaded_move_packages.push((path, package_id));
preload_modules.push(object)
}
}
Expand Down
2 changes: 1 addition & 1 deletion sui_programmability/adapter/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ fn init_modules<E: Debug, S: ResourceResolver<Error = E> + ModuleResolver<Error
let args = vec![ctx.to_vec()];

let gas_used = match execute_internal(
&vm,
vm,
state_view,
&module_id,
&Identifier::new(INIT_FN_NAME.as_str()).unwrap(),
Expand Down

0 comments on commit 6a095af

Please sign in to comment.