Skip to content

Commit

Permalink
Fix: Documentation Typos and Improve Clarity (#2232)
Browse files Browse the repository at this point in the history
* typos Preauthorization.md

* typos grpcurl.md

* Update state-sync.md

* typos transaction_proposal.md
  • Loading branch information
cypherpepe authored Dec 18, 2024
1 parent ae2196a commit af33265
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/Preauthorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In Provenance a user can pre-authorize another user to transfer a restricted coi
## Overview of how to do this
In order to grant authorization for a user to transfer restricted coin, a user can take advantage of the `grant-authz` command on the marker module. `provenanced tx marker grant-authz --help` can be used in order to view all of the possible flags and inputs. However, in order for it to run, it is necessary to give this command the address of the user that will be pre-authorized to conduct transfers, the type of action that is pre-authorized which in this case is `transfer`, a transfer-limit, and an address to sign the transaction with using the `--from` flag.

The flag `spend-limit` is used to set the total amount of coin that can be transfered. Each transfer will deduct from this total until it is exhausted at which point no more transfers can be made. However, the spend limit can be reset by the user doing another pre-authorize transaction. Note that this new spend limit does not take into account what has already been spent. So, for example if you grant permissions to transfer 100 coins and 50 are transfered and then you set a new spend limit of 75, that allows the user to now transfer 75 coins. The previously spent coins are not taken into account with the new spend limit.
The flag `spend-limit` is used to set the total amount of coin that can be transferred. Each transfer will deduct from this total until it is exhausted at which point no more transfers can be made. However, the spend limit can be reset by the user doing another pre-authorize transaction. Note that this new spend limit does not take into account what has already been spent. So, for example if you grant permissions to transfer 100 coins and 50 are transferred and then you set a new spend limit of 75, that allows the user to now transfer 75 coins. The previously spent coins are not taken into account with the new spend limit.

If a user wants to revoke authorization to transfer then they can use the `revoke-authz` command on the marker module. All the flags and inputs can be found with: `provenanced tx marker revoke-authz --help`. This command needs the address of the user whose authorization is being revoked, the type of action that is being revoked, and the signature of the address revoking permissions to itself with the `--from` flag.

Expand Down
2 changes: 1 addition & 1 deletion docs/grpcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ grpcurl -plaintext localhost:9090 list

#### Describe service methods

Descrie available methods of the `bank` service.
Describe available methods of the `bank` service.

```shell
grpcurl \
Expand Down
2 changes: 1 addition & 1 deletion docs/state-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ cp $PIO_HOME/config/config.toml $PIO_HOME/config/config.toml.orig
# setup sync node
# PIO_RPC="$( host rpc.test.provenance.io | awk '{print $4}' ):26657"
# (Temporary workaround due to how the tesntet hosts are currently configured)
# (Temporary workaround due to how the testnet hosts are currently configured)
PIO_RPC=34.66.209.228:26657
# State Sync Configuration Options
Expand Down
8 changes: 4 additions & 4 deletions docs/transaction_proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In this tutorial we will learn how to submit a proposal and then vote on it. Pro
## Author
- Matthew Witkowski

## Prequisites
## Prerequisites
The reader should first have understanding of what Provenance is and how to use its CLI. Additionally, the user should have the following setup.

- A local Provence directory that can be built and run
Expand All @@ -30,7 +30,7 @@ This will allow users to vote on a proposal for a minute. This should be more th
A new proposal can be made if the voting time expires.

## Creating the Proposal
In order to propose we need a json file containing our messages to run if the proposal passes. We can make use of the `--generate-only` flag on a transaction to easily give us the JSON. In this example, the `wasm store` transaction is being proposed. The code for the contract will only be stored if the proposal passes. In order to obtain the JSON for this transaction the following command can be ran.
In order to propose we need a json file containing our messages to run if the proposal passes. We can make use of the `--generate-only` flag on a transaction to easily give us the JSON. In this example, the `wasm store` transaction is being proposed. The code for the contract will only be stored if the proposal passes. In order to obtain the JSON for this transaction the following command can be run.

`provenanced -t tx wasm store contract.wasm --from $ACCOUNT --gas auto --gas-adjustment 1.5 --gas-prices 1905nhash --instantiate-everybody "true" --generate-only`

Expand Down Expand Up @@ -72,7 +72,7 @@ The only remaining issue is the `sender`. In order for the transaction to pass i
Update the sender and save the file as `proposal.json`

## Proposing
The json file has been written to disk, but the proposal has not yet been sent out to Provenance. To propose it the following command can be ran:
The json file has been written to disk, but the proposal has not yet been sent out to Provenance. To propose it the following command can be run:

`provenanced -t tx gov submit-proposal proposal.json --gas-prices 1905nhash --gas auto --gas-adjustment 1.5 --from $ACCOUNT`

Expand All @@ -84,4 +84,4 @@ The proposal id in this example is 4 so the following transaction will vote on p
`provenanced -t tx gov vote 4 yes --from $ACCOUNT --gas auto --gas-adjustment 1.5 --gas-prices 1905nhash`

Lastly, proposal 4 can be monitored by using the following command. The proposal will eventually succeed or fail depending on the transaction message that was passed in.
`provenanced -t q gov proposal 4`
`provenanced -t q gov proposal 4`

0 comments on commit af33265

Please sign in to comment.