Skip to content

Commit

Permalink
feat(modules): add okp4/okp4d v7.0.0 documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Mar 4, 2024
1 parent d850b75 commit a443aa6
Show file tree
Hide file tree
Showing 7 changed files with 1,051 additions and 23 deletions.
28 changes: 5 additions & 23 deletions modules/logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ Gives:
"height": "7235",
"gas_used": "9085",
"answer": {
"success": true,
"has_more": false,
"variables": [
"X"
Expand All @@ -121,10 +120,7 @@ Gives:
"substitutions": [
{
"variable": "X",
"term": {
"name": "john",
"arguments": []
}
"expression": "john"
}
]
}
Expand All @@ -151,13 +147,12 @@ The response is an object that contains the following fields:
- `height`: the height of the block at which the query was evaluated.
- `gas_used`: the amount of gas used to evaluate the query.
- `answer`: the result of the query. It is an object that contains the following fields:
- `success`: a boolean that indicates whether the query was successful or not. Successful means that solutions were
found, i.e. the query was satisfiable.
- `has_more`: a boolean that indicates whether there are more results to be retrieved. It's just informative since no
more results can be retrieved.
- `variables`: an array of strings that contains the names of the variables that were used in the query.
- `results`: an array of objects that contains the results of the query. Each result is an object that contains the
- `results`: an array of objects that contains the solutions of the query. Each result is an object that contains the
following fields:
- `error`: an optional string that contains an error message if the query failed for the current solution.
- `substitutions`: an array of objects that contains the substitutions that were made to satisfy the query. A
substitution is a set of variable-value pairs that is used to replace variables with constants. A substitution
is the result of unification. A substitution is used to replace variables with constants when evaluating a rule.
Expand Down Expand Up @@ -211,7 +206,6 @@ utilized within a query, or limiting the depth of the backtracking algorithm.
- [Answer](#logic.v1beta2.Answer)
- [Result](#logic.v1beta2.Result)
- [Substitution](#logic.v1beta2.Substitution)
- [Term](#logic.v1beta2.Term)

- [logic/v1beta2/query.proto](#logic/v1beta2/query.proto)
- [QueryServiceAskRequest](#logic.v1beta2.QueryServiceAskRequest)
Expand Down Expand Up @@ -352,8 +346,6 @@ Answer represents the answer to a logic query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `success` | [bool](#bool) | | success specifies if the query was successful. |
| `error` | [string](#string) | | error specifies the error message if the query caused an error. |
| `has_more` | [bool](#bool) | | has_more specifies if there are more solutions than the ones returned. |
| `variables` | [string](#string) | repeated | variables represent all the variables in the query. |
| `results` | [Result](#logic.v1beta2.Result) | repeated | results represent all the results of the query. |
Expand All @@ -366,6 +358,7 @@ Result represents the result of a query.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `error` | [string](#string) | | error specifies the error message if the query caused an error. |
| `substitutions` | [Substitution](#logic.v1beta2.Substitution) | repeated | substitutions represent all the substitutions made to the variables in the query to obtain the answer. |

<a name="logic.v1beta2.Substitution"></a>
Expand All @@ -377,18 +370,7 @@ Substitution represents a substitution made to the variables in the query to obt
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `variable` | [string](#string) | | variable is the name of the variable. |
| `term` | [Term](#logic.v1beta2.Term) | | term is the term that the variable is substituted with. |

<a name="logic.v1beta2.Term"></a>

### Term

Term is the representation of a piece of data and can be a constant, a variable, or an atom.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `name` | [string](#string) | | name is the name of the term. |
| `arguments` | [Term](#logic.v1beta2.Term) | repeated | arguments are the arguments of the term, which can be constants, variables, or atoms. |
| `expression` | [string](#string) | | expression is the value substituted for the variable, represented directly as a Prolog term (e.g., atom, number, compound). |

[//]: # (end messages)

Expand Down
2 changes: 2 additions & 0 deletions modules/mint.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Params defines the parameters for the mint module.
| `mint_denom` | [string](#string) | | Denomination of the coin to be minted. |
| `inflation_coef` | [string](#string) | | Annual inflation coefficient, influencing the inflation rate based on the bonded ratio. Values range from 0 to 1, with higher values indicating higher inflation. |
| `blocks_per_year` | [uint64](#uint64) | | Estimated number of blocks per year. |
| `inflation_max` | [string](#string) | | Maximum annual inflation rate. |
| `inflation_min` | [string](#string) | | Minimum annual inflation rate. |

[//]: # (end messages)

Expand Down
Loading

0 comments on commit a443aa6

Please sign in to comment.