Files
nym/contracts/multisig/cw4-group/schema/cw4-group.json
2023-08-07 12:32:20 +03:00

401 lines
9.5 KiB
JSON

{
"contract_name": "cw4-group",
"contract_version": "1.0.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InstantiateMsg",
"type": "object",
"required": [
"members"
],
"properties": {
"admin": {
"description": "The admin is the only account that can update the group state. Omit it to make the group immutable.",
"type": [
"string",
"null"
]
},
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/Member"
}
}
},
"additionalProperties": false,
"definitions": {
"Member": {
"description": "A group member has a weight associated with them. This may all be equal, or may have meaning in the app that makes use of the group (eg. voting power)",
"type": "object",
"required": [
"addr",
"weight"
],
"properties": {
"addr": {
"type": "string"
},
"weight": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
}
},
"execute": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"description": "Change the admin",
"type": "object",
"required": [
"update_admin"
],
"properties": {
"update_admin": {
"type": "object",
"properties": {
"admin": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "apply a diff to the existing members. remove is applied after add, so if an address is in both, it is removed",
"type": "object",
"required": [
"update_members"
],
"properties": {
"update_members": {
"type": "object",
"required": [
"add",
"remove"
],
"properties": {
"add": {
"type": "array",
"items": {
"$ref": "#/definitions/Member"
}
},
"remove": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"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": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Remove a hook. Must be called by Admin",
"type": "object",
"required": [
"remove_hook"
],
"properties": {
"remove_hook": {
"type": "object",
"required": [
"addr"
],
"properties": {
"addr": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
"Member": {
"description": "A group member has a weight associated with them. This may all be equal, or may have meaning in the app that makes use of the group (eg. voting power)",
"type": "object",
"required": [
"addr",
"weight"
],
"properties": {
"addr": {
"type": "string"
},
"weight": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
}
},
"query": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"oneOf": [
{
"type": "object",
"required": [
"admin"
],
"properties": {
"admin": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"total_weight"
],
"properties": {
"total_weight": {
"type": "object",
"properties": {
"at_height": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"list_members"
],
"properties": {
"list_members": {
"type": "object",
"properties": {
"limit": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"start_after": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"member"
],
"properties": {
"member": {
"type": "object",
"required": [
"addr"
],
"properties": {
"addr": {
"type": "string"
},
"at_height": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Shows all registered hooks.",
"type": "object",
"required": [
"hooks"
],
"properties": {
"hooks": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"migrate": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MigrateMsg",
"type": "object",
"additionalProperties": false
},
"sudo": null,
"responses": {
"admin": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AdminResponse",
"description": "Returned from Admin.query_admin()",
"type": "object",
"properties": {
"admin": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"hooks": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "HooksResponse",
"type": "object",
"required": [
"hooks"
],
"properties": {
"hooks": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"list_members": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MemberListResponse",
"type": "object",
"required": [
"members"
],
"properties": {
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/Member"
}
}
},
"additionalProperties": false,
"definitions": {
"Member": {
"description": "A group member has a weight associated with them. This may all be equal, or may have meaning in the app that makes use of the group (eg. voting power)",
"type": "object",
"required": [
"addr",
"weight"
],
"properties": {
"addr": {
"type": "string"
},
"weight": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
}
},
"member": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MemberResponse",
"type": "object",
"properties": {
"weight": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
},
"total_weight": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TotalWeightResponse",
"type": "object",
"required": [
"weight"
],
"properties": {
"weight": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
}
}