Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Add WasmMsg::UpdateAdmin to transfer migration ownership to other address #889

Closed
yun-yeo opened this issue Apr 20, 2021 · 2 comments · Fixed by #900
Closed
Assignees
Milestone

Comments

@yun-yeo
Copy link

yun-yeo commented Apr 20, 2021

Currently there is no way to transfer contract migration ownership to other address, if the admin is a contract.

It would be great to have some interface to transfer migration privilege to other address.

@yun-yeo yun-yeo changed the title Suggestion: Add WasmMsg::UpdateOwner to transfer migration ownership to other address Suggestion: Add WasmMsg::UpdateAdmin to transfer migration ownership to other address Apr 20, 2021
@webmaster128 webmaster128 added this to the 0.14.0 milestone Apr 21, 2021
@ethanfrey
Copy link
Member

When we add this, let's add ClearAdmin as well.

I think we decided to make one with String and other with no field, rather than using Option<String> for the public messages. I would keep the same here, unless there is a strong objection.

@webmaster128
Copy link
Member

Good point, @ethanfrey. Let's make the messages match the wasmd types:

// MsgUpdateAdmin sets a new admin for a smart contract
message MsgUpdateAdmin {
  // Sender is the that actor that signed the messages
  string sender = 1;
  // NewAdmin address to be set
  string new_admin = 2;
  // Contract is the address of the smart contract
  string contract = 3;
}

// MsgClearAdmin removes any admin stored for a smart contract
message MsgClearAdmin {
  // Sender is the that actor that signed the messages
  string sender = 1;
  // Contract is the address of the smart contract
  string contract = 3;
}

I think we decided to split it in two message types to make clearing admin very explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants