Skip to content

Commit

Permalink
update contract schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
kwtalley committed Jul 12, 2024
1 parent 1135471 commit 9cc6cdb
Show file tree
Hide file tree
Showing 3 changed files with 573 additions and 0 deletions.
30 changes: 30 additions & 0 deletions contracts/marker/schema/marker.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@
"additionalProperties": false,
"definitions": {
"AccessGrant": {
"description": "AccessGrant associates a collection of permissions with an address for delegated marker account control.",
"type": "object",
"required": [
"address",
Expand Down Expand Up @@ -380,6 +381,7 @@
}
},
"BaseAccount": {
"description": "BaseAccount defines a base account type. It contains all the necessary fields for basic account functionality. Any custom account type should extend this type for additional functionality (e.g. vesting).",
"type": "object",
"required": [
"account_number",
Expand Down Expand Up @@ -413,6 +415,7 @@
}
},
"Coin": {
"description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.",
"type": "object",
"required": [
"amount",
Expand All @@ -428,6 +431,7 @@
}
},
"MarkerAccount": {
"description": "MarkerAccount holds the marker configuration information in addition to a base account structure.",
"type": "object",
"required": [
"access_control",
Expand All @@ -443,18 +447,22 @@
],
"properties": {
"access_control": {
"description": "Access control lists",
"type": "array",
"items": {
"$ref": "#/definitions/AccessGrant"
}
},
"allow_forced_transfer": {
"description": "Whether an admin can transfer restricted coins from a 3rd-party account without their signature.",
"type": "boolean"
},
"allow_governance_control": {
"description": "indicates that governance based control is allowed for this marker",
"type": "boolean"
},
"base_account": {
"description": "base cosmos account information including address and coin holdings.",
"anyOf": [
{
"$ref": "#/definitions/BaseAccount"
Expand All @@ -465,29 +473,36 @@
]
},
"denom": {
"description": "value denomination and total supply for the token.",
"type": "string"
},
"manager": {
"description": "Address that owns the marker configuration. This account must sign any requests to change marker config (only valid for statuses prior to finalization)",
"type": "string"
},
"marker_type": {
"description": "Marker type information",
"type": "integer",
"format": "int32"
},
"required_attributes": {
"description": "list of required attributes on restricted marker in order to send and receive transfers if sender does not have transfer authority",
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"description": "Indicates the current status of this marker record.",
"type": "integer",
"format": "int32"
},
"supply": {
"description": "the total supply expected for a marker. This is the amount that is minted when a marker is created.",
"type": "string"
},
"supply_fixed": {
"description": "A fixed supply will mint additional coin automatically if the total supply decreases below a set value. This may occur if the coin is burned or an account holding the coin is slashed. (default: true)",
"type": "boolean"
}
}
Expand Down Expand Up @@ -516,6 +531,7 @@
"additionalProperties": false,
"definitions": {
"AccessGrant": {
"description": "AccessGrant associates a collection of permissions with an address for delegated marker account control.",
"type": "object",
"required": [
"address",
Expand Down Expand Up @@ -557,6 +573,7 @@
}
},
"BaseAccount": {
"description": "BaseAccount defines a base account type. It contains all the necessary fields for basic account functionality. Any custom account type should extend this type for additional functionality (e.g. vesting).",
"type": "object",
"required": [
"account_number",
Expand Down Expand Up @@ -590,6 +607,7 @@
}
},
"Coin": {
"description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.",
"type": "object",
"required": [
"amount",
Expand All @@ -605,6 +623,7 @@
}
},
"MarkerAccount": {
"description": "MarkerAccount holds the marker configuration information in addition to a base account structure.",
"type": "object",
"required": [
"access_control",
Expand All @@ -620,18 +639,22 @@
],
"properties": {
"access_control": {
"description": "Access control lists",
"type": "array",
"items": {
"$ref": "#/definitions/AccessGrant"
}
},
"allow_forced_transfer": {
"description": "Whether an admin can transfer restricted coins from a 3rd-party account without their signature.",
"type": "boolean"
},
"allow_governance_control": {
"description": "indicates that governance based control is allowed for this marker",
"type": "boolean"
},
"base_account": {
"description": "base cosmos account information including address and coin holdings.",
"anyOf": [
{
"$ref": "#/definitions/BaseAccount"
Expand All @@ -642,29 +665,36 @@
]
},
"denom": {
"description": "value denomination and total supply for the token.",
"type": "string"
},
"manager": {
"description": "Address that owns the marker configuration. This account must sign any requests to change marker config (only valid for statuses prior to finalization)",
"type": "string"
},
"marker_type": {
"description": "Marker type information",
"type": "integer",
"format": "int32"
},
"required_attributes": {
"description": "list of required attributes on restricted marker in order to send and receive transfers if sender does not have transfer authority",
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"description": "Indicates the current status of this marker record.",
"type": "integer",
"format": "int32"
},
"supply": {
"description": "the total supply expected for a marker. This is the amount that is minted when a marker is created.",
"type": "string"
},
"supply_fixed": {
"description": "A fixed supply will mint additional coin automatically if the total supply decreases below a set value. This may occur if the coin is burned or an account holding the coin is slashed. (default: true)",
"type": "boolean"
}
}
Expand Down
16 changes: 16 additions & 0 deletions contracts/name/schema/name.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,21 @@
"lookup": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryReverseLookupResponse",
"description": "QueryReverseLookupResponse is the response type for the Query/Resolve method.",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "an array of names bound against a given address",
"type": "array",
"items": {
"type": "string"
}
},
"pagination": {
"description": "pagination defines an optional pagination for the request.",
"anyOf": [
{
"$ref": "#/definitions/PageResponse"
Expand All @@ -155,12 +158,14 @@
},
"definitions": {
"PageResponse": {
"description": "PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest.\n\nmessage SomeResponse { repeated Bar results = 1; PageResponse page = 2; }",
"type": "object",
"required": [
"total"
],
"properties": {
"next_key": {
"description": "next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results.",
"type": [
"array",
"null"
Expand All @@ -172,6 +177,7 @@
}
},
"total": {
"description": "total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise",
"type": "integer",
"format": "uint64",
"minimum": 0.0
Expand All @@ -183,9 +189,11 @@
"params": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryParamsResponse",
"description": "QueryParamsResponse is the response type for the Query/Params RPC method.",
"type": "object",
"properties": {
"params": {
"description": "params defines the parameters of the module.",
"anyOf": [
{
"$ref": "#/definitions/Params"
Expand All @@ -198,6 +206,7 @@
},
"definitions": {
"Params": {
"description": "Params defines the set of params for the name module.",
"type": "object",
"required": [
"allow_unrestricted_names",
Expand All @@ -207,19 +216,23 @@
],
"properties": {
"allow_unrestricted_names": {
"description": "determines if unrestricted name keys are allowed or not",
"type": "boolean"
},
"max_name_levels": {
"description": "maximum number of name segments to allow. Example: `foo.bar.baz` would be 3",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"max_segment_length": {
"description": "maximum length of name segment to allow",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"min_segment_length": {
"description": "minimum length of name segment to allow",
"type": "integer",
"format": "uint32",
"minimum": 0.0
Expand All @@ -231,16 +244,19 @@
"resolve": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryResolveResponse",
"description": "QueryResolveResponse is the response type for the Query/Resolve method.",
"type": "object",
"required": [
"address",
"restricted"
],
"properties": {
"address": {
"description": "a string containing the address the name resolves to",
"type": "string"
},
"restricted": {
"description": "Whether owner signature is required to add sub-names.",
"type": "boolean"
}
}
Expand Down
Loading

0 comments on commit 9cc6cdb

Please sign in to comment.