From 3c409896054e0e83cd6e1f52f1917e48339ec920 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Tue, 23 Jan 2024 06:04:04 +0000 Subject: [PATCH] Update documentation --- x/foundation/README.md | 53 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/x/foundation/README.md b/x/foundation/README.md index 9f6073adf2..3d6c0a8016 100644 --- a/x/foundation/README.md +++ b/x/foundation/README.md @@ -14,9 +14,9 @@ back these foundation-specific functionalities. ## Contents * [Concepts](#concepts) -* [Parameters](#parameters) * [State](#state) * [Msg Service](#msg-service) + * [Msg/UpdateParams](#msgupdateparams) * [Msg/UpdateDecisionPolicy](#msgupdatedecisionpolicy) * [Msg/UpdateMembers](#msgupdatemembers) * [Msg/LeaveFoundation](#msgleavefoundation) @@ -30,6 +30,7 @@ back these foundation-specific functionalities. * [Msg/FundTreasury](#msgfundtreasury) * [Msg/WithdrawFromTreasury](#msgwithdrawfromtreasury) * [Events](#events) + * [EventUpdateFoundationParams](#eventupdatefoundationparams) * [EventUpdateDecisionPolicy](#eventupdatedecisionpolicy) * [EventUpdateMembers](#eventupdatedmembers) * [EventLeaveFoundation](#eventleavefoundation) @@ -266,15 +267,16 @@ The foundation can withdraw coins from the treasury. The recipient must have the corresponding authorization (`ReceiveFromTreasuryAuthorization`) prior to sending the message `Msg/WithdrawFromTreasury`. -# Parameters -## FoundationTax +# State -The value of `FoundationTax` is the foundation tax rate. +## Params -* FoundationTax: `sdk.Dec` +### FoundationTax -# State +* Params: `0x00 -> PropocolBuffer(Params)`. + +The value of `FoundationTax` is the foundation tax rate. ## FoundationInfo @@ -343,6 +345,17 @@ Authorization) tuple. # Msg Service +## Msg/UpdateParams + +The `MsgUpdateParams` can be used to update the parameters of `foundation`. + ++++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L62-L71 + +It's expected to fail if: + +* the authority is not the module's authority. +* the parameters introduces any new foundation-specific features. + ## Msg/UpdateDecisionPolicy The `MsgUpdateDecisionPolicy` can be used to update the decision policy. @@ -508,6 +521,15 @@ The message handling should fail if: # Events +## EventUpdateFoundationParams + +`EventUpdateFoundationParams` is an event emitted when the foundation +parameters have been updated. + +| Attribute Key | Attribute Value | +|---------------|-----------------| +| params | {params} | + ## EventUpdateDecisionPolicy `EventUpdateDecisionPolicy` is an event emitted when the decision policy have @@ -983,6 +1005,25 @@ simd tx foundation --help you cannot broadcast the message directly. The use of those commands is to make it easier to generate the messages by end users. +#### update-params + +The `update-params` command allows users to update the foundation's parameters. + +```bash +simd tx foundation update-params [authority] [params-json] [flags] +``` + +Example: + +```bash +simd tx foundation update-params link1... \ + '{ + "foundation_tax": "0.1" + }' +``` + +**Note:** The signer MUST be the module's authority. + #### update-members The `update-members` command allows users to update the foundation's members.