Skip to content

Commit

Permalink
x/blueaccount: a new message to delete all domain accounts (#1042)
Browse files Browse the repository at this point in the history
A new message was added `DeleteAllAccountsMsg` to the `x/blueaccount`
extension that allows a domain owner to delete all (except the one with
an empty name) accounts that belong to that domain.

The above message can be used together with a domain transfer message in
order to transfer ownership of a domain without any of the accounts that
might have belonged to it before.

resolve #1036
  • Loading branch information
husio authored Nov 20, 2019
1 parent 2d99f53 commit 3c61f12
Show file tree
Hide file tree
Showing 12 changed files with 1,176 additions and 322 deletions.
938 changes: 659 additions & 279 deletions cmd/bnsd/app/codec.pb.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions cmd/bnsd/app/codec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ message Tx {
blueaccount.ReplaceAccountTargetsMsg blueaccount_replace_account_target_msg = 87;
blueaccount.DeleteAccountMsg blueaccount_delete_account_msg = 88;
blueaccount.UpdateConfigurationMsg blueaccount_update_configuration_msg = 89;
blueaccount.FlushDomainMsg blueaccount_delete_all_accounts_msg = 90;
}
}

Expand Down Expand Up @@ -112,6 +113,7 @@ message ExecuteBatchMsg {
blueaccount.ReplaceAccountTargetsMsg blueaccount_replace_account_target_msg = 87;
blueaccount.DeleteAccountMsg blueaccount_delete_account_msg = 88;
blueaccount.UpdateConfigurationMsg blueaccount_update_configuration_msg = 89;
blueaccount.FlushDomainMsg blueaccount_delete_all_accounts_msg = 90;
}
}
repeated Union messages = 1 [(gogoproto.nullable) = false];
Expand Down Expand Up @@ -149,6 +151,7 @@ message ProposalOptions {
blueaccount.ReplaceAccountTargetsMsg blueaccount_replace_account_target_msg = 87;
blueaccount.DeleteAccountMsg blueaccount_delete_account_msg = 88;
blueaccount.UpdateConfigurationMsg blueaccount_update_configuration_msg = 89;
blueaccount.FlushDomainMsg blueaccount_delete_all_accounts_msg = 90;
}
}

Expand Down Expand Up @@ -182,6 +185,7 @@ message ExecuteProposalBatchMsg {
blueaccount.ReplaceAccountTargetsMsg blueaccount_replace_account_target_msg = 87;
blueaccount.DeleteAccountMsg blueaccount_delete_account_msg = 88;
blueaccount.UpdateConfigurationMsg blueaccount_update_configuration_msg = 89;
blueaccount.FlushDomainMsg blueaccount_flush_domain_msg = 90;
}
}
repeated Union messages = 1 [(gogoproto.nullable) = false];
Expand Down
315 changes: 272 additions & 43 deletions cmd/bnsd/x/blueaccount/codec.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions cmd/bnsd/x/blueaccount/codec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,11 @@ message DeleteAccountMsg {
string domain = 2;
string name = 3;
}

// FlushDomainMsg issues deletion of all names (except the one with an empty
// name) that belongs to given domain.
// Message must be signed by the domain owner.
message FlushDomainMsg {
weave.Metadata metadata = 1;
string domain = 2;
}
Loading

0 comments on commit 3c61f12

Please sign in to comment.