Skip to content

Commit

Permalink
Use permanent links in quarantine and sanction spec docs. (#469)
Browse files Browse the repository at this point in the history
* [1312]: Update the links in quarantine spec docs to use permanent links.

* [1312]: Update the links in sanction spec docs to use permanent links.
  • Loading branch information
SpicyLemon authored Jan 30, 2023
1 parent 8f3fb25 commit 3abe36f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
14 changes: 9 additions & 5 deletions x/quarantine/spec/03_messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ order: 3
An account can activate quarantine using a `MsgOptIn`.
It contains only the address to quarantine.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/tx.proto#L31-L36
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L33-L38

It is expected to fail if the `to_address` is invalid.

Expand All @@ -18,7 +18,7 @@ It is expected to fail if the `to_address` is invalid.
An account can deactivate quarantine using a `MsgOptOut`.
It contains only the address to unquarantine.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/tx.proto#L41-L46
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L43-L48

It is expected to fail if the `to_address` is invalid.

Expand All @@ -28,7 +28,7 @@ Quarantined funds can be accepted by the intended receiver using a `MsgAccept`.
It contains a `to_address` (receiver) and one or more `from_addresses` (senders).
It also contains a flag to indicate whether auto-accept should be set up for all provided addresses.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/tx.proto#L51-L67
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L53-L67

Any quarantined funds for the `to_address` from any `from_address` are accepted (regardless of whether they've been previously declined).

Expand All @@ -42,13 +42,17 @@ It is expected to fail if:
- No `from_addresses` are provided.
- Any `from_addresses` are invalid.

The response will contain a total of all funds released.

+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L69-L74

## Msg/Decline

Quarantined funds can be declined by the intended receiver using a `MsgDecline`.
It contains a `to_address` (receiver) and one or more `from_addresses` (senders).
It also contains a flag to indicate whether auto-decline should be set up for all provided addresses.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/tx.proto#L72-L88
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L76-L90

Any quarantined funds for the `to_address` from any `from_address` are declined.

Expand All @@ -67,7 +71,7 @@ It is expected to fail if:
Auto-Responses can be defined either through the `permanent` flags with a `MsgAccept` or `MsgDecline`, or using a `MsgUpdateAutoResponses`.
It contains a `to_address` and a list of `updates`. Each `AutoResponseUpdate` contains a `from_address` and the desired `response` for it.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/tx.proto#L93-L102
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L95-L104

Providing a `response` of `AUTO_RESPONSE_UNSPECIFIED` will cause the applicable entry to be deleted, allowing users to un-set previous auto-responses.

Expand Down
16 changes: 8 additions & 8 deletions x/quarantine/spec/05_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ The query takes in a `to_address` and outputs `true` if the address is quarantin

Request:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/query.proto#L46-50
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L46-L50

Response:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/query.proto#L52-56
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L52-L56

It is expected to fail if the `to_address` is invalid.

Expand All @@ -26,15 +26,15 @@ This query takes in an optional `to_address` and optional `from_address` and out

Request:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/query.proto#L58-67
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L58-L67

Response:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/query.proto#L69-76
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L69-L76

QuarantinedFunds:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/quarantine.proto#L10-21
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/quarantine.proto#L10-L21

- If neither a `to_address` nor `from_address` are provided, all non-declined quarantined funds for any addresses will be returned.
- If the request contains a `to_address` but no `from_address`, all non-declined quarantined funds for the `to_address` are returned.
Expand All @@ -54,15 +54,15 @@ This query takes in a `to_address` and optional `from_address` and outputs infor

Request:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/query.proto#L78-87
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L78-L87

Response:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/query.proto#L89-96
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L89-L96

AutoResponseEntry:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-bank-quarantine/proto/cosmos/quarantine/v1beta1/quarantine.proto#L23-31
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/quarantine.proto#L23-L31

- If no `from_address` is provided, all auto-response entries for the provided `to_address` are returned. The results will not contain any entries for `AUTO_RESPONSE_UNSPECIFIED`.
- If a `from_address` is provided, the auto-response setting that `to_address` has from `from_address` is returned. This result might be `AUTO_RESPONSE_UNSPECIFIED`.
Expand Down
6 changes: 3 additions & 3 deletions x/sanction/spec/03_messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All Msg Service endpoints in the `x/sanction` module are for use with governance
A user can request that accounts be sanctioned by submitting a governance proposal containing a `MsgSanction`.
It contains the list of `addresses` of accounts to be sanctioned and the `authority` able to do it.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/tx.proto#L22-L32
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/tx.proto#L22-L32

If the proposal ever has enough total deposit (defined in params), immediate temporary sanctions are issued for each address.
Temporary sanctions expire at the completion of the governance proposal regardless of outcome.
Expand All @@ -30,7 +30,7 @@ It is expected to fail if:
A user can request that accounts be unsanctioned by submitting a governance proposal containing a `MsgUnsanction`.
It contains the list of `addresses` of accounts to be unsanctioned and the `authority` able to do it.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/tx.proto#L37-L47
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/tx.proto#L37-L47

If the proposal ever has enough total deposit (defined in params), immediate temporary unsanctions are issued for each address.
Temporary unsanctions expire at the completion of the governance proposal regardless of outcome.
Expand All @@ -48,7 +48,7 @@ It is expected to fail if:
The sanction module params can be updated by submitting a governance proposal containing a `MsgUpdateParams`.
It contains the desired new `params` and the `authority` able to update them.

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/tx.proto#L52-L62
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/tx.proto#L52-L62

If `params` is `null`, they will be deleted from state, reverting them to their code-defined defaults.
If a field in `params` is `null` or empty, the record in state will reflect that.
Expand Down
20 changes: 10 additions & 10 deletions x/sanction/spec/05_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ If it returns `false`, the account *is* allowed to move its funds (at least from

Request:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L33-L36
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L34-L37

Response:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L38-L42
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L39-L43

It is expected to fail if the `address` is invalid.

Expand All @@ -30,11 +30,11 @@ It takes in `pagination` parameters and outputs a list of `addresses`.

Request:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L44-L48
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L45-L49

Response:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L50-L57
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L51-L58

This query does not take into account temporary sanctions or temporary unsanctions.
Addresses that are temporarily sanctioned (but not permanently sanctioned) are **not** returned by this query.
Expand All @@ -51,19 +51,19 @@ It takes in `pagination` parameters and an optional `address`.

Request:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L59-L66
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L60-L67

Response:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L68-L74
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L69-L75

TemporaryEntry:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/sanction.proto#L27-L34
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/sanction.proto#L27-L35

TempStatus:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/sanction.proto#L36-L45
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/sanction.proto#L37-L47

- If an `address` is provided, only temporary entries associated with that address are returned.
- If an `address` is provided that does not have any temporary entries, a single `TemporaryEntry` with a `status` of `TEMP_STATUS_UNSPECIFIED` is returned.
Expand All @@ -83,11 +83,11 @@ It has no input and outputs the `params`.

Request:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L76-L77
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L77-L78

Response:

+++ https://github.com/provenance-io/cosmos-sdk/blob/prov/dwedul/1046-sanction/proto/cosmos/sanction/v1beta1/query.proto#L79-L83
+++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/sanction/v1beta1/query.proto#L80-L84

This query returns the values used for the params.
That is, if there are params stored in state, they are returned;
Expand Down

0 comments on commit 3abe36f

Please sign in to comment.