feat(admin): ownership commands#320
Conversation
|
Claude finished @xDarksome's task in 58s —— View job Code Review
Issue 1: Typo in completion message File: crates/admin_cli/src/ownership.rs:47 The completion message contains a grammatical error: "The complete the transfer" should be "To complete the transfer". println!(
"The complete the transfer the new owner is required to call `wcn_admin ownership accept` \
command"
);Issue 2: No ownership validation in File: crates/admin_cli/src/ownership.rs:54-68 The Current implementation: async fn accept_ownership(args: ClusterArgs) -> antml:parameter>
let cluster = args.connect().await?;
cluster
.accept_ownership()
.await
.context("Cluster::accept_ownership")?;
println!(
"OK. {} is the new owner",
cluster.smart_contract().signer().unwrap()
);
Ok(())
}The Issue 3: Missing ownership transfer validation in testing mock File: crates/cluster/src/smart_contract/testing.rs:397-403 The async fn transfer_ownership(&self, _new_owner: AccountAddress) -> WriteResult<()> {
Ok(())
}
async fn accept_ownership(&self) -> WriteResult<()> {
Ok(())
}These should properly update Issue 4: No tests for ownership transfer functionality No test files were added or modified for the new ownership transfer commands. Given this is security-critical functionality for migrating admin accounts to KMS/Safe, comprehensive tests should be added to verify:
|
…Connect/wcn into feat/admin-cli-transfer-ownership
Description
Implements
wcn_admin owner transferandwcn_admin ownership acceptcommands.Required to migrate the admin accounts to KMS/Safe.
How Has This Been Tested?
Manually
Due Diligence