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

Add cw4 hooks #156

Merged
merged 9 commits into from
Dec 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions contracts/cw3-flex-multisig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ with the desired member set. For now, this only is supported by
(TODO).

If you create a `cw4-group` contract and want a multisig to be able
to modify it's own group, set the admin as your personal key, then init the
multisig pointing to the group, then modify the admin of the group to point
back to the multisig. This is the current practice to create such circular
dependencies (TODO: document better).
to modify it's own group, do the following in multiple transactions:

* init cw4-group, with your personal key as admin
* init a multisig pointing to the group
* TODO: `AddHook{multisig}` on the group contract
* `UpdateAdmin{multisig}` on the group contract

This is the current practice to create such circular dependencies,
and depends on an external driver (hard to impossible to script such a
self-deploying contract on-chain). (TODO: document better).

When creating the multisig, you must set the required weight to pass a vote
as well as the max/default voting period. (TODO: allow more threshold types)
Expand Down
40 changes: 40 additions & 0 deletions contracts/cw4-group/schema/handle_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,46 @@
}
}
}
},
{
"description": "Add a new hook to be informed of all membership changes. Must be called by Admin",
"type": "object",
"required": [
"add_hook"
],
"properties": {
"add_hook": {
"type": "object",
"required": [
"addr"
],
"properties": {
"addr": {
"$ref": "#/definitions/HumanAddr"
}
}
}
}
},
{
"description": "Remove a hook. Must be called by Admin",
"type": "object",
"required": [
"remove_hook"
],
"properties": {
"remove_hook": {
"type": "object",
"required": [
"addr"
],
"properties": {
"addr": {
"$ref": "#/definitions/HumanAddr"
}
}
}
}
}
],
"definitions": {
Expand Down
12 changes: 12 additions & 0 deletions contracts/cw4-group/schema/query_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@
}
}
}
},
{
"description": "Shows all registered hooks. Returns HooksResponse.",
"type": "object",
"required": [
"hooks"
],
"properties": {
"hooks": {
"type": "object"
}
}
}
],
"definitions": {
Expand Down
Loading