diff --git a/docs/protocol/evmos-cli/proposal-draft.md b/docs/protocol/evmos-cli/proposal-draft.md new file mode 100644 index 0000000..f388d46 --- /dev/null +++ b/docs/protocol/evmos-cli/proposal-draft.md @@ -0,0 +1,65 @@ +--- +sidebar_position: 7 +--- + +# Drafting a proposal + +The `draft-proposal` command in the Evmos CLI is part of the Cosmos-SDK +governance module and is used to generate a draft proposal JSON file. +This generated proposal JSON file contains a skeleton structure for a governance proposal. + +## Command Syntax + +```bash +evmosd tx gov draft-proposal [flags] +``` + +## Usage + +To create a draft proposal using the `evmosd tx gov draft-proposal` command, follow these steps: + +1. Run the command + + ```bash + evmosd tx gov draft-proposal + ``` + +2. The command will present a list of proposal types for selection. + The available options typically include: + + ```bash + Use the arrow keys to navigate: ↓ ↑ → ← + ? Select proposal type: + text + community-pool-spend + software-upgrade + cancel-software-upgrade + ▸ other + ``` + + In case you don't find the required proposal (e.g. update params), + choose the `other` option. It will show an extensive list of the supported messages: + + ```bash + ✔ other + Use the arrow keys to navigate: ↓ ↑ → ← + ? Select proposal message type:: + ↑ /evmos.erc20.v1.MsgUpdateParams + ▸ /evmos.incentives.v1.MsgUpdateParams + /evmos.inflation.v1.MsgUpdateParams + /evmos.recovery.v1.MsgUpdateParams + ↓ /evmos.revenue.v1.MsgCancelRevenue + ``` + +3. Follow the on-screen instructions to complete the process. + The command will generate a JSON file that you can use for your proposal. + +4. Once the JSON file is generated, + you can make any necessary changes to the proposal information within the file. + +5. Finally, use the generated JSON file as input when submitting + your proposal using the `evmosd tx gov submit-proposal` command. + + ```bash + evmosd tx gov submit-proposal draft_proposal.json [flags] + ``` diff --git a/docs/protocol/modules/erc20.md b/docs/protocol/modules/erc20.md index bf0cf27..f7716d7 100644 --- a/docs/protocol/modules/erc20.md +++ b/docs/protocol/modules/erc20.md @@ -174,8 +174,8 @@ Here are our recommendations for the reviewing process: The `x/erc20` module keeps the following objects in state: -| State Object | Description | Key | Value | Store | -| ------------------ | ---------------------------------------------- | --------------------------- | ------------------- | --- | +| State Object | Description | Key | Value | Store | +| ------------------ | ---------------------------------------------- | --------------------------- | ------------------- | ----- | | `TokenPair` | Token Pair bytecode | `[]byte{1} + []byte(id)` | `[]byte{tokenPair}` | KV | | `TokenPairByERC20` | Token Pair id bytecode by erc20 contract bytes | `[]byte{2} + []byte(erc20)` | `[]byte(id)` | KV | | `TokenPairByDenom` | Token Pair id bytecode by denom string | `[]byte{3} + []byte(denom)` | `[]byte(id)` | KV | @@ -610,10 +610,10 @@ The `x/erc20` module emits the following events: The erc20 module contains the following parameters: -| Key | Type | Default Value | -| ----------------------- | ------------- | ----------------------------- | -| `EnableErc20` | bool | `true` | -| `EnableEVMHook` | bool | `true` | +| Key | Type | Default Value | +| --------------- | ---- | ------------- | +| `EnableErc20` | bool | `true` | +| `EnableEVMHook` | bool | `true` | ### Enable ERC20 @@ -713,12 +713,15 @@ Allows users to submit a `ToggleTokenConversionProposal`. evmosd tx gov submit-legacy-proposal toggle-token-conversion TOKEN [flags] ``` -**`param-change`** +**Update Params** -Allows users to submit a `ParameterChangeProposal``. +Allows users to submit a `MsgUpdateParams` with the desired changes on the `x/erc20` module parameters. +To do this, you will have to provide a JSON file with the correspondiong message in the `submit-proposal` command. + +For more information on how to draft a proposal, refer to the [Drafting a proposal section](../evmos-cli/proposal-draft.md). ```bash -evmosd tx gov submit-legacy-proposal param-change PROPOSAL_FILE [flags] +evmosd tx gov submit-proposal proposal.json [flags] ``` ### gRPC diff --git a/docs/protocol/modules/incentives.md b/docs/protocol/modules/incentives.md index 17d49b9..9d2ec14 100644 --- a/docs/protocol/modules/incentives.md +++ b/docs/protocol/modules/incentives.md @@ -442,12 +442,15 @@ Allows users to submit a `CanelIncentiveProposal`. evmosd tx gov submit-legacy-proposal cancel-incentive CONTRACT_ADDRESS [flags] ``` -**`param-change`** +**Update Params** -Allows users to submit a `ParameterChangeProposal``. +Allows users to submit a `MsgUpdateParams` with the desired changes on the `x/incentives` module parameters. +To do this, you will have to provide a JSON file with the correspondiong message in the `submit-proposal` command. + +For more information on how to draft a proposal, refer to the [Drafting a proposal section](../evmos-cli/proposal-draft.md). ```bash -evmosd tx gov submit-legacy-proposal param-change PROPOSAL_FILE [flags] +evmosd tx gov submit-proposal proposal.json [flags] ``` ### gRPC diff --git a/docs/protocol/modules/inflation.md b/docs/protocol/modules/inflation.md index 89fb000..9c10fa2 100644 --- a/docs/protocol/modules/inflation.md +++ b/docs/protocol/modules/inflation.md @@ -119,12 +119,12 @@ f(3) 46 875 000 600 000 000 128 424 The `x/inflation` module keeps the following objects in state: -| State Object | Description | Key | Value | Store | -| ------------------ | ------------------------------ | ----------- | ---------------------------- | ----- | -| Period | Period Counter | `[]byte{1}` | `[]byte{period}` | KV | -| EpochIdentifier | Epoch identifier bytes | `[]byte{3}` | `[]byte{epochIdentifier}` | KV | -| EpochsPerPeriod | Epochs per period bytes | `[]byte{4}` | `[]byte{epochsPerPeriod}` | KV | -| SkippedEpochs | Number of skipped epochs bytes | `[]byte{5}` | `[]byte{skippedEpochs}` | KV | +| State Object | Description | Key | Value | Store | +| --------------- | ------------------------------ | ----------- | ------------------------- | ----- | +| Period | Period Counter | `[]byte{1}` | `[]byte{period}` | KV | +| EpochIdentifier | Epoch identifier bytes | `[]byte{3}` | `[]byte{epochIdentifier}` | KV | +| EpochsPerPeriod | Epochs per period bytes | `[]byte{4}` | `[]byte{epochsPerPeriod}` | KV | +| SkippedEpochs | Number of skipped epochs bytes | `[]byte{5}` | `[]byte{skippedEpochs}` | KV | #### Period @@ -189,7 +189,7 @@ The `x/inflation` module emits the following events: ### Inflation | Type | Attribute Key | Attribute Value | -| ----------- |----------------------|-----------------------------------------------| +| ----------- | -------------------- | --------------------------------------------- | | `inflation` | `"epoch_provisions"` | `{fmt.Sprintf("%d", epochNumber)}` | | `inflation` | `"epoch_number"` | `{strconv.FormatUint(uint64(in.Epochs), 10)}` | | `inflation` | `"amount"` | `{mintedCoin.Amount.String()}` | @@ -201,7 +201,7 @@ The `x/inflation` module contains the parameters described below. All parameters can be modified via governance. | Key | Type | Default Value | -| ------------------------ | ---------------------- | ----------------------------------------------------------------------------- | +| ------------------------------------- | ---------------------- | ----------------------------------------------------------------------------- | | `ParamStoreKeyMintDenom` | string | `evm.DefaultEVMDenom` // “aevmos” | | `ParamStoreKeyExponentialCalculation` | ExponentialCalculation | `A: sdk.NewDec(int64(300_000_000))` | | | | `R: sdk.NewDecWithPrec(50, 2)` | @@ -314,15 +314,15 @@ evmosd query inflation params [flags] #### Proposals -The `tx gov submit-legacy-proposal` commands allow users to query create a proposal -using the governance module CLI: +**Update Params** -**`param-change`** +Allows users to submit a `MsgUpdateParams` with the desired changes on the `x/inflation` module parameters. +To do this, you will have to provide a JSON file with the correspondiong message in the `submit-proposal` command. -Allows users to submit a `ParameterChangeProposal`. +For more information on how to draft a proposal, refer to the [Drafting a proposal section](../evmos-cli/proposal-draft.md). ```bash -evmosd tx gov submit-legacy-proposal param-change [proposal-file] [flags] +evmosd tx gov submit-proposal proposal.json [flags] ``` ### gRPC @@ -340,6 +340,6 @@ evmosd tx gov submit-legacy-proposal param-change [proposal-file] [flags] | `GET` | `/evmos/inflation/v1/period` | Gets current inflation period | | `GET` | `/evmos/inflation/v1/epoch_mint_provision` | Gets current inflation epoch provisions value | | `GET` | `/evmos/inflation/v1/skipped_epochs` | Gets current number of skipped epochs | -| `GET` | `/evmos/inflation/v1/total_supply` | Gets current total supply | +| `GET` | `/evmos/inflation/v1/total_supply` | Gets current total supply | | `GET` | `/evmos/inflation/v1/inflation_rate` | Gets current inflation rate | | `GET` | `/evmos/inflation/v1/params` | Gets current inflation parameters | diff --git a/docs/protocol/modules/revenue.md b/docs/protocol/modules/revenue.md index 41fc071..e04c1a2 100644 --- a/docs/protocol/modules/revenue.md +++ b/docs/protocol/modules/revenue.md @@ -116,11 +116,11 @@ sent by an account different from `DeployerEOA`, only `DeployerEOA` can register The `x/revenue` module keeps the following objects in state: -| State Object | Description | Key | Value | Store | -| :-------------------- | :------------------------------------ | :---------------------------------------------------------------- | :----------------- | :---- | -| `Revenue` | Fee split bytecode | `[]byte{1} + []byte(contract_address)` | `[]byte{revenue}` | KV | -| `DeployerRevenues` | Contract by deployer address bytecode | `[]byte{2} + []byte(deployer_address) + []byte(contract_address)` | `[]byte{1}` | KV | -| `WithdrawerRevenues` | Contract by withdraw address bytecode | `[]byte{3} + []byte(withdraw_address) + []byte(contract_address)` | `[]byte{1}` | KV | +| State Object | Description | Key | Value | Store | +| :------------------- | :------------------------------------ | :---------------------------------------------------------------- | :---------------- | :---- | +| `Revenue` | Fee split bytecode | `[]byte{1} + []byte(contract_address)` | `[]byte{revenue}` | KV | +| `DeployerRevenues` | Contract by deployer address bytecode | `[]byte{2} + []byte(deployer_address) + []byte(contract_address)` | `[]byte{1}` | KV | +| `WithdrawerRevenues` | Contract by withdraw address bytecode | `[]byte{3} + []byte(withdraw_address) + []byte(contract_address)` | `[]byte{1}` | KV | #### Revenue @@ -345,24 +345,24 @@ The `x/revenue` module emits the following events: ### Register Fee Split -| Type | Attribute Key | Attribute Value | -| :------------------- | :--------------------- | :------------------------ | +| Type | Attribute Key | Attribute Value | +| :----------------- | :--------------------- | :------------------------ | | `register_revenue` | `"contract"` | `{msg.ContractAddress}` | | `register_revenue` | `"sender"` | `{msg.DeployerAddress}` | | `register_revenue` | `"withdrawer_address"` | `{msg.WithdrawerAddress}` | ### Update Fee Split -| Type | Attribute Key | Attribute Value | -| :----------------- | :--------------------- | :------------------------ | +| Type | Attribute Key | Attribute Value | +| :--------------- | :--------------------- | :------------------------ | | `update_revenue` | `"contract"` | `{msg.ContractAddress}` | | `update_revenue` | `"sender"` | `{msg.DeployerAddress}` | | `update_revenue` | `"withdrawer_address"` | `{msg.WithdrawerAddress}` | ### Cancel Fee Split -| Type | Attribute Key | Attribute Value | -| :----------------- | :------------ | :---------------------- | +| Type | Attribute Key | Attribute Value | +| :--------------- | :------------ | :---------------------- | | `cancel_revenue` | `"contract"` | `{msg.ContractAddress}` | | `cancel_revenue` | `"sender"` | `{msg.DeployerAddress}` | @@ -372,7 +372,7 @@ The fees module contains the following parameters: | Key | Type | Default Value | | :------------------------- | :------ | :------------ | -| `EnableRevenue` | bool | `true` | +| `EnableRevenue` | bool | `true` | | `DeveloperShares` | sdk.Dec | `50%` | | `AddrDerivationCostCreate` | uint64 | `50` | @@ -394,7 +394,6 @@ A flat gas fee is charged for each address derivation iteration. We allow a maximum number of 20 iterations, and therefore a maximum number of 20 nonces can be given for deriving the smart contract address from the deployer's address. - ## Clients ### CLI @@ -409,9 +408,9 @@ evmosd query revenue params #### Queries -| Command | Subcommand | Description | -| :----------------- | :--------------------- | :--------------------------------------- | -| `query` `revenue` | `params` | Get revenue params | +| Command | Subcommand | Description | +| :---------------- | :--------------------- | :------------------------------------- | +| `query` `revenue` | `params` | Get revenue params | | `query` `revenue` | `contract` | Get the revenue for a given contract | | `query` `revenue` | `contracts` | Get all revenues | | `query` `revenue` | `deployer-contracts` | Get all revenues of a given deployer | @@ -419,39 +418,39 @@ evmosd query revenue params #### Transactions -| Command | Subcommand | Description | -| :-------------- | :--------- | :----------------------------------------- | -| `tx` `revenue` | `register` | Register a contract for receiving revenue | +| Command | Subcommand | Description | +| :------------- | :--------- | :----------------------------------------- | +| `tx` `revenue` | `register` | Register a contract for receiving revenue | | `tx` `revenue` | `update` | Update the withdraw address for a contract | -| `tx` `revenue` | `cancel` | Remove the revenue for a contract | +| `tx` `revenue` | `cancel` | Remove the revenue for a contract | ### gRPC #### Queries -| Verb | Method | Description | -| :----- | :------------------------------------------------ | :--------------------------------------- | -| `gRPC` | `evmos.revenue.v1.Query/Params` | Get revenue params | +| Verb | Method | Description | +| :----- | :---------------------------------------------- | :------------------------------------- | +| `gRPC` | `evmos.revenue.v1.Query/Params` | Get revenue params | | `gRPC` | `evmos.revenue.v1.Query/Revenue` | Get the revenue for a given contract | | `gRPC` | `evmos.revenue.v1.Query/Revenues` | Get all revenues | | `gRPC` | `evmos.revenue.v1.Query/DeployerRevenues` | Get all revenues of a given deployer | | `gRPC` | `evmos.revenue.v1.Query/WithdrawerRevenues` | Get all revenues of a given withdrawer | -| `GET` | `/evmos/revenue/v1/params` | Get revenue params | -| `GET` | `/evmos/revenue/v1/revenues/{contract_address}` | Get the revenue for a given contract | +| `GET` | `/evmos/revenue/v1/params` | Get revenue params | +| `GET` | `/evmos/revenue/v1/revenues/{contract_address}` | Get the revenue for a given contract | | `GET` | `/evmos/revenue/v1/revenues` | Get all revenues | | `GET` | `/evmos/revenue/v1/revenues/{deployer_address}` | Get all revenues of a given deployer | | `GET` | `/evmos/revenue/v1/revenues/{withdraw_address}` | Get all revenues of a given withdrawer | #### Transactions -| Verb | Method | Description | -| :----- | :----------------------------------------- | :----------------------------------------- | -| `gRPC` | `evmos.revenue.v1.Msg/RegisterRevenue` | Register a contract for receiving revenue | -| `gRPC` | `evmos.revenue.v1.Msg/UpdateRevenue` | Update the withdraw address for a contract | -| `gRPC` | `evmos.revenue.v1.Msg/CancelRevenue` | Remove the revenue for a contract | -| `POST` | `/evmos/revenue/v1/tx/register_revenue` | Register a contract for receiving revenue | +| Verb | Method | Description | +| :----- | :-------------------------------------- | :----------------------------------------- | +| `gRPC` | `evmos.revenue.v1.Msg/RegisterRevenue` | Register a contract for receiving revenue | +| `gRPC` | `evmos.revenue.v1.Msg/UpdateRevenue` | Update the withdraw address for a contract | +| `gRPC` | `evmos.revenue.v1.Msg/CancelRevenue` | Remove the revenue for a contract | +| `POST` | `/evmos/revenue/v1/tx/register_revenue` | Register a contract for receiving revenue | | `POST` | `/evmos/revenue/v1/tx/update_revenue` | Update the withdraw address for a contract | -| `POST` | `/evmos/revenue/v1/tx/cancel_revenue` | Remove the revenue for a contract | +| `POST` | `/evmos/revenue/v1/tx/cancel_revenue` | Remove the revenue for a contract | ## Future Improvements