github.com/Finschia/finschia-sdk@v0.48.1/x/foundation/README.md (about) 1 <!-- 2 order: 0 3 title: Foundation Overview 4 parent: 5 title: "foundation" 6 --> 7 8 # `x/foundation` 9 10 ## Abstract 11 12 This module provides the functionalities related to the foundation. 13 The foundation can turn off these functionalities irreversibly, through the 14 corresponding proposal. Therefore, the users can ensure that no one can bring 15 back these foundation-specific functionalities. 16 17 ## Contents 18 19 * [Concepts](#concepts) 20 * [Parameters](#parameters) 21 * [State](#state) 22 * [Msg Service](#msg-service) 23 * [Msg/UpdateDecisionPolicy](#msgupdatedecisionpolicy) 24 * [Msg/UpdateMembers](#msgupdatemembers) 25 * [Msg/LeaveFoundation](#msgleavefoundation) 26 * [Msg/SubmitProposal](#msgsubmitproposal) 27 * [Msg/WithdrawProposal](#msgwithdrawproposal) 28 * [Msg/Vote](#msgvote) 29 * [Msg/Exec](#msgexec) 30 * [Msg/UpdateCensorship](#msgupdatecensorship) 31 * [Msg/Grant](#msggrant) 32 * [Msg/Revoke](#msgrevoke) 33 * [Msg/FundTreasury](#msgfundtreasury) 34 * [Msg/WithdrawFromTreasury](#msgwithdrawfromtreasury) 35 * [Events](#events) 36 * [EventUpdateDecisionPolicy](#eventupdatedecisionpolicy) 37 * [EventUpdateMembers](#eventupdatedmembers) 38 * [EventLeaveFoundation](#eventleavefoundation) 39 * [EventSubmitProposal](#eventsubmitproposal) 40 * [EventWithdrawProposal](#eventwithdrawproposal) 41 * [EventVote](#eventvote) 42 * [EventExec](#eventexec) 43 * [EventUpdateCensorship](#eventupdatecensorship) 44 * [EventGrant](#eventgrant) 45 * [EventRevoke](#eventrevoke) 46 * [EventFundTreasury](#eventfundedtreasury) 47 * [EventWithdrawFromTreasury](#eventwithdrawedfromtreasury) 48 * [Client](#client) 49 * [CLI](#cli) 50 * [gRPC](#grpc) 51 52 # Concepts 53 54 ## Authority 55 56 `x/foundation`'s authority is a module account associated with the foundation 57 and a decision policy. It is an "administrator" which has the ability to add, 58 remove and update members in the foundation. 59 `x/foundation` has several messages which cannot be triggered but by the 60 authority. It includes membership management messages, and other messages which 61 controls the assets of the foundation. 62 63 **Note:** The authority is a module account, which means no one has the private 64 key of the authority. Hence, foundation members MUST propose, vote and execute 65 the corresponding proposal. 66 67 ## Decision Policy 68 69 A decision policy is the rules that dictate whether a proposal should pass or 70 not based on its tally outcome. 71 72 All decision policies generally would have a mininum execution period and a 73 maximum voting window. The minimum execution period is the minimum amount of 74 time that must pass after submission in order for a proposal to potentially be 75 executed, and it may be set to 0. The maximum voting window is the maximum time 76 after submission that a proposal may be voted on before it is tallied. 77 78 The chain developer also defines an app-wide maximum execution period, which is 79 the maximum amount of time after a proposal's voting period end where the 80 members are allowed to execute a proposal. 81 82 The current foundation module comes shipped with two decision policies: 83 threshold and percentage. Any chain developer can extend upon these two, by 84 creating custom decision policies, as long as they adhere to the 85 `DecisionPolicy` interface: 86 87 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/x/foundation/foundation.go#L90-L103 88 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/x/foundation/foundation.go#L90-L103 89 90 ### Threshold decision policy 91 92 A threshold decision policy defines a threshold of yes votes (based on a tally 93 of voter weights) that must be achieved in order for a proposal to pass. For 94 this decision policy, abstain and veto are simply treated as no's. 95 96 ### Percentage decision policy 97 98 A percentage decision policy is similar to a threshold decision policy, except 99 that the threshold is not defined as a constant weight, but as a percentage. 100 It's more suited for a foundation where the membership can be updated, as the 101 percentage threshold stays the same, and doesn't depend on how the number of 102 members get updated. 103 104 ### Outsourcing decision policy 105 106 A outsourcing decision policy is a policy set after `x/foundation` decides to 107 outsource its proposal relevant features to other modules (e.g. `x/group`). 108 It means one can expect that any states relevant to the feature must be removed 109 in the update to this policy. 110 111 ## Proposal 112 113 Any foundation member(s) can submit a proposal for the foundation policy 114 account to decide upon. A proposal consists of a set of messages that will be 115 executed if the proposal passes as well as any metadata associated with the 116 proposal. 117 118 ### Voting 119 120 There are four choices to choose while voting - yes, no, abstain and veto. Not 121 all decision policies will take the four choices into account. Votes can 122 contain some optional metadata. 123 124 In the current implementation, the voting window begins as soon as a proposal 125 is submitted, and the end is defined by the decision policy. 126 127 ### Withdrawing Proposals 128 129 Proposals can be withdrawn any time before the voting period end, either by the 130 module's authority or by one of the proposers. Once withdrawn, it is marked as 131 `PROPOSAL_STATUS_WITHDRAWN`, and no more voting or execution is allowed on it. 132 133 ### Aborted Proposals 134 135 If the decision policy is updated during the voting period of the proposal, 136 then the proposal is marked as `PROPOSAL_STATUS_ABORTED`, and no more voting or 137 execution is allowed on it. This is because the decision policy defines the 138 rules of proposal voting and execution, so if those rules change during the 139 lifecycle of a proposal, then the proposal should be marked as stale. 140 141 ### Tallying 142 143 Tallying is the counting of all votes on a proposal. It can be triggered by the 144 following two factors: 145 146 * either someone tries to execute the proposal (see next section), which can 147 happen on a `Msg/Exec` transaction, or a `Msg/{SubmitProposal,Vote}` 148 transaction with the `Exec` field set. When a proposal execution is 149 attempted, a tally is done first to make sure the proposal passes. 150 * or on `EndBlock` when the proposal's voting period end just passed. 151 152 If the tally result passes the decision policy's rules, then the proposal is 153 marked as `PROPOSAL_STATUS_ACCEPTED`, or else it is marked as 154 `PROPOSAL_STATUS_REJECTED`. In any case, no more voting is allowed anymore, and 155 the tally result is persisted to state in the proposal's `FinalTallyResult`. 156 157 ### Executing Proposals 158 159 Proposals are executed only when the tallying is done, and the decision policy 160 allows the proposal to pass based on the tally outcome. They are marked by the 161 status `PROPOSAL_STATUS_ACCEPTED`. Execution must happen before a duration of 162 `MaxExecutionPeriod` (set by the chain developer) after each proposal's voting 163 period end. 164 165 Proposals will not be automatically executed by the chain in this current 166 design, but rather a member must submit a `Msg/Exec` transaction to attempt to 167 execute the proposal based on the current votes and decision policy. Any member 168 can execute proposals that have been accepted, and execution fees are paid by 169 the proposal executor. 170 171 It's also possible to try to execute a proposal immediately on creation or on 172 new votes using the `Exec` field of `Msg/SubmitProposal` and `Msg/Vote` 173 requests. In the former case, proposers signatures are considered as yes votes. 174 In these cases, if the proposal can't be executed (i.e. it didn't pass the 175 decision policy's rules), it will still be opened for new votes and 176 could be tallied and executed later on. 177 178 A successful proposal execution will have its `ExecutorResult` marked as 179 `PROPOSAL_EXECUTOR_RESULT_SUCCESS`. The proposal will be automatically pruned 180 after execution. On the other hand, a failed proposal execution will be marked 181 as `PROPOSAL_EXECUTOR_RESULT_FAILURE`. Such a proposal can be re-executed 182 multiple times, until it expires after `MaxExecutionPeriod` after voting period 183 end. 184 185 ## Pruning 186 187 Proposals and votes are automatically pruned to avoid state bloat. 188 189 Votes are pruned: 190 191 * either after a successful tally, i.e. a tally whose result passes the 192 decision policy's rules, which can be trigged by a `Msg/Exec` or a 193 `Msg/{SubmitProposal,Vote}` with the `Exec` field set, 194 * or on `EndBlock` right after the proposal's voting period end. This applies 195 to proposals with status `aborted` or `withdrawn` too. 196 * or after updating the membership or decision policy. 197 198 whichever happens first. 199 200 Proposals are pruned: 201 202 * on `EndBlock` whose proposal status is `withdrawn` or `aborted` on proposal's 203 voting period end before tallying, 204 * and either after a successful proposal execution, 205 * or on `EndBlock` right after the proposal's `voting_period_end` + 206 `max_execution_period` (defined as an app-wide configuration) is passed, 207 208 whichever happens first. 209 210 ## Censorship 211 212 The foundation module defines interfaces of authorizations on messages to 213 enforce _censorship_ on its execution. The other modules may deny the execution 214 of the message based on the information in the foundation. 215 216 A censorship has its target message type URL and authority which can trigger 217 the messages which manipulate the relevant censorship information: 218 219 * [Msg/UpdateCensorship](#msgupdatecensorship) 220 * [Msg/Grant](#msggrant) 221 * [Msg/Revoke](#msgrevoke) 222 223 `Authorization` is an interface that must be implemented by a concrete 224 authorization logic to validate and execute grants. `Authorization`s are 225 extensible and can be defined for any Msg service method even outside of the 226 module where the Msg method is defined. 227 228 **Note:** The foundation module's `Authorization` is different from that of 229 `x/authz`, while the latter allows an account to perform actions on behalf of 230 another account. 231 232 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/x/foundation/authz.go#L10-L27 233 234 ## Built-in Authorizations 235 236 ### ReceiveFromTreasuryAuthorization 237 238 `ReceiveFromTreasuryAuthorization` implements the `Authorization` interface for 239 the [Msg/WithdrawFromTreasury](#msgwithdrawfromtreasury). 240 241 **Note:** The subject which executes 242 `lbm.foundation.v1.MsgWithdrawFromTreasury` is the foundation. 243 244 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/authz.proto#L9-L13 245 246 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/x/foundation/authz.pb.go#L27-L30 247 248 ### CreateValidatorAuthorization 249 250 `CreateValidatorAuthorization` implements the `Authorization` interface for the 251 [Msg/CreateValidator](../stakingplus/spec/03_messages.md#msgcreatevalidator). 252 An account must have this authorization prior to sending the message. 253 254 **Note:** You MUST provide the `CreateValidatorAuthorization`s into the genesis 255 if `Msg/CreateValidator` is being censored (`CensoredMsgTypeUrls` contains the 256 url of `Msg/CreateValidator`), or the chain cannot be started. 257 258 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/stakingplus/v1/authz.proto#L9-L15 259 260 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/x/stakingplus/authz.pb.go#L27-L31 261 262 ## Foundation Treasury 263 264 `x/foundation` intercepts the rewards prior to its distribution 265 (by `x/distribution`). The rate would be `FoundationTax`. 266 267 The foundation can withdraw coins from the treasury. The recipient must have 268 the corresponding authorization (`ReceiveFromTreasuryAuthorization`) prior to 269 sending the message `Msg/WithdrawFromTreasury`. 270 271 # Parameters 272 273 ## FoundationTax 274 275 The value of `FoundationTax` is the foundation tax rate. 276 277 * FoundationTax: `sdk.Dec` 278 279 # State 280 281 ## FoundationInfo 282 283 `FoundationInfo` contains the information relevant to the foundation. 284 285 * FoundationInfo: `0x01 -> ProtocolBuffer(FoundationInfo)`. 286 287 ### Version 288 289 The `Version` is used to track changes to the foundation membership. Whenever 290 the membership is changed, this value is incremented, which will cause 291 proposals based on older versions to fail. 292 293 ### TotalWeight 294 295 The `TotalWeight` is the number of the foundation members. 296 297 ### DecisionPolicy 298 299 The `DecisionPolicy` is the decision policy of the foundation. 300 301 ## Member 302 303 The `Member` is the foundation member. 304 305 * Member: `0x10 | []byte(member.Address) -> ProtocolBuffer(Member)`. 306 307 ## PreviousProposalID 308 309 The value of the `PreviousProposalID` is the last used proposal ID. The chain 310 uses this value to issue the ID of the next new proposal. 311 312 * PreviousProposalID: `0x11 -> BigEndian(ProposalId)`. 313 314 ## Proposal 315 316 * Proposal: `0x12 | BigEndian(ProposalId) -> ProtocolBuffer(Proposal)`. 317 318 ## ProposalByVotingPeriodEnd 319 320 `ProposalByVotingPeriodEnd` allows to retrieve proposals sorted by 321 chronological `voting_period_end`. This index is used when tallying the 322 proposal votes at the end of the voting period, and for pruning proposals at 323 `VotingPeriodEnd + MaxExecutionPeriod`. 324 325 * ProposalByVotingPeriodEnd: 326 `0x13 | sdk.FormatTimeBytes(proposal.VotingPeriodEnd) | BigEndian(ProposalId) -> []byte()`. 327 328 ## Vote 329 330 * Vote: `0x40 | BigEndian(ProposalId) | []byte(voter.Address) -> ProtocolBuffer(Vote)`. 331 332 ## Censorship 333 334 Censorships are identified by its target message type URL. 335 336 * Censorship: `0x20 | []byte(censorship.MsgTypeURL) -> ProtocolBuffer(Censorship)` 337 338 ## Grant 339 340 Grants are identified by combining grantee address and `Authorization` type 341 (its target message type URL). Hence we only allow one grant for the (grantee, 342 Authorization) tuple. 343 344 * Grant: `0x21 | len(grant.Grantee) (1 byte) | []byte(grant.Grantee) | []byte(grant.Authorization.MsgTypeURL()) -> ProtocolBuffer(Authorization)` 345 346 # Msg Service 347 348 ## Msg/UpdateDecisionPolicy 349 350 The `MsgUpdateDecisionPolicy` can be used to update the decision policy. 351 352 +++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L111-L118 353 354 It's expected to fail if: 355 356 * the authority is not the module's authority. 357 * the new decision policy's `Validate()` method doesn't pass. 358 359 ## Msg/UpdateMembers 360 361 Foundation members can be updated with the `MsgUpdateMembers`. 362 363 +++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L98-L106 364 365 In the list of `MemberUpdates`, an existing member can be removed by setting 366 its `remove` flag to true. 367 368 It's expected to fail if: 369 370 * the authority is not the module's authority. 371 * if the decision policy's `Validate()` method fails against the updated 372 membership. 373 374 ## Msg/LeaveFoundation 375 376 The `MsgLeaveFoundation` allows a foundation member to leave the foundation. 377 378 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L205-L209 379 380 It's expected to fail if: 381 382 * the address is not of a foundation member. 383 * if the decision policy's `Validate()` method fails against the updated 384 membership. 385 386 ## Msg/SubmitProposal 387 388 A new proposal can be created with the `MsgSubmitProposal`, which has a list of 389 proposers addresses, a list of messages to execute if the proposal is accepted 390 and some optional metadata. 391 An optional `Exec` value can be provided to try to execute the proposal 392 immediately after proposal creation. Proposers signatures are considered as yes 393 votes in this case. 394 395 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L135-L151 396 397 It's expected to fail if: 398 399 * metadata length is greater than `MaxMetadataLen` config. 400 * if any of the proposers is not a foundation member. 401 402 ## Msg/WithdrawProposal 403 404 A proposal can be withdrawn using `MsgWithdrawProposal` which has an `address` 405 (can be either a proposer or the module's authority) and a `proposal_id` (which 406 has to be withdrawn). 407 408 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L159-L166 409 410 It's expected to fail if: 411 412 * the address is neither the module's authority nor a proposer of the proposal. 413 * the proposal is already closed or aborted. 414 415 ## Msg/Vote 416 417 A new vote can be created with the `MsgVote`, given a proposal id, a voter 418 address, a choice (yes, no, veto or abstain) and some optional metadata. 419 An optional `Exec` value can be provided to try to execute the proposal 420 immediately after voting. 421 422 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L171-L188 423 424 It's expected to fail if: 425 426 * metadata length is greater than `MaxMetadataLen` config. 427 * the proposal is not in voting period anymore. 428 429 ## Msg/Exec 430 431 A proposal can be executed with the `MsgExec`. 432 433 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L193-L200 434 435 The messages that are part of this proposal won't be executed if: 436 437 * the proposal has not been accepted by the decision policy. 438 * the proposal has already been successfully executed. 439 440 ## Msg/UpdateCensorship 441 442 A censorship information is updated by using the `MsgUpdateCensorship` message. 443 One cannot introduce a censorship over a new message type URL by this message. 444 445 +++ https://github.com/Finschia/finschia-sdk/blob/d9428ec5d825dfd9964f510e32bd03a01adade8c/proto/lbm/foundation/v1/tx.proto#L215-L222 446 447 The authority of the following modules are candidates of censorship authority: 448 449 * `CENSORSHIP_AUTHORITY_GOVERNANCE`: `x/gov` 450 * `CENSORSHIP_AUTHORITY_FOUNDATION`: `x/foundation` 451 452 One may specify `CENSORSHIP_AUTHORITY_UNSPECIFIED` to remove the censorship. 453 454 +++ https://github.com/Finschia/finschia-sdk/blob/d9428ec5d825dfd9964f510e32bd03a01adade8c/proto/lbm/foundation/v1/tx.proto#L25-L34 455 456 The message handling should fail if: 457 458 * the authority is not the current censorship's authority. 459 * corresponding enum value of the current censorship's authority is lesser than that of the provided censorship's authority. 460 461 **Note:** Do NOT confuse with that of `x/authz`. 462 463 ## Msg/Grant 464 465 An authorization grant is created by using the `MsgGrant` message. 466 If there is already a grant for the `(grantee, Authorization)` tuple, then the 467 new grant overwrites the previous one. To update or extend an existing grant, a 468 new grant with the same `(grantee, Authorization)` tuple should be created. 469 470 +++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L215-L224 471 472 The message handling should fail if: 473 474 * the authority is not the current censorship's authority. 475 * provided `Authorization` is not implemented. 476 * `Authorization.MsgTypeURL()` is not defined in the router (there is no 477 defined handler in the app router to handle that Msg types). 478 479 **Note:** Do NOT confuse with that of `x/authz`. 480 481 ## Msg/Revoke 482 483 A grant can be removed with the `MsgRevoke` message. 484 485 +++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L229-L235 486 487 The message handling should fail if: 488 489 * the authority is not the current censorship's authority. 490 * provided `MsgTypeUrl` is empty. 491 492 ## Msg/FundTreasury 493 494 Anyone can fund treasury with `MsgFundTreasury`. 495 496 +++ https://github.com/Finschia/finschia-sdk/blob/392277a33519d289154e8da27f05f9a6788ab076/proto/lbm/foundation/v1/tx.proto#L76-L81 497 498 ## Msg/WithdrawFromTreasury 499 500 The foundation can withdraw coins from the treasury with 501 `MsgWithdrawFromTreasury`. 502 503 +++ https://github.com/Finschia/finschia-sdk/blob/f682f758268c19dd93958abbbaf697f51e6991b3/proto/lbm/foundation/v1/tx.proto#L86-L93 504 505 The message handling should fail if: 506 507 * the authority is not the module's authority. 508 * the address which receives the coins has no authorization of 509 `ReceiveFromTreasuryAuthorization`. 510 511 # Events 512 513 ## EventUpdateDecisionPolicy 514 515 `EventUpdateDecisionPolicy` is an event emitted when the decision policy have 516 been updated. 517 518 | Attribute Key | Attribute Value | 519 |-----------------|------------------| 520 | decision_policy | {decisionPolicy} | 521 522 ## EventUpdateMembers 523 524 `EventUpdateMembers` is an event emitted when the foundation members have been 525 updated. 526 527 | Attribute Key | Attribute Value | 528 |----------------|-----------------| 529 | member_updates | {members} | 530 531 ## EventLeaveFoundation 532 533 `EventLeaveFoundation` is an event emitted when a foundation member leaves the 534 foundation. 535 536 | Attribute Key | Attribute Value | 537 |---------------|-----------------| 538 | address | {memberAddress} | 539 540 ## EventSubmitProposal 541 542 `EventSubmitProposal` is an event emitted when a proposal is submitted. 543 544 | Attribute Key | Attribute Value | 545 |---------------|-----------------| 546 | proposal | {proposal} | 547 548 ## EventWithdrawProposal 549 550 `EventWithdrawProposal` is an event emitted when a proposal is withdrawn. 551 552 | Attribute Key | Attribute Value | 553 |---------------|-----------------| 554 | proposal_id | {proposalId} | 555 556 ## EventVote 557 558 `EventVote` is an event emitted when a voter votes on a proposal. 559 560 | Attribute Key | Attribute Value | 561 |---------------|-----------------| 562 | vote | {vote} | 563 564 ## EventExec 565 566 `EventExec` is an event emitted when a proposal is executed. 567 568 | Attribute Key | Attribute Value | 569 |---------------|-----------------| 570 | proposal_id | {proposalId} | 571 | result | {result} | 572 573 ## EventUpdateCensorship 574 575 `EventCensorship` is an event emitted when a censorship is updated. 576 577 | Attribute Key | Attribute Value | 578 |---------------|-----------------| 579 | censorship | {censorship} | 580 581 ## EventGrant 582 583 `EventGrant` is an event emitted when an authorization is granted to a grantee. 584 585 | Attribute Key | Attribute Value | 586 |---------------|------------------| 587 | grantee | {granteeAddress} | 588 | authorization | {authorization} | 589 590 ## EventRevoke 591 592 `EventRevoke` is an event emitted when an authorization is revoked from a 593 grantee. 594 595 | Attribute Key | Attribute Value | 596 |---------------|------------------| 597 | grantee | {granteeAddress} | 598 | msg_type_url | {msgTypeURL} | 599 600 ## EventFundTreasury 601 602 `EventFundTreasury` is an event emitted when one funds the treasury. 603 604 | Attribute Key | Attribute Value | 605 |---------------|-----------------| 606 | from | {fromAddress} | 607 | amount | {amount} | 608 609 ## EventWithdrawFromTreasury 610 611 `EventWithdrawFromTreasury` is an event emitted when coins are withdrawn from 612 the treasury. 613 614 | Attribute Key | Attribute Value | 615 |---------------|-----------------| 616 | to | {toAddress} | 617 | amount | {amount} | 618 619 # Client 620 621 ## CLI 622 623 A user can query and interact with the `foundation` module using the CLI. 624 625 ### Query 626 627 The `query` commands allow users to query `foundation` state. 628 629 ```bash 630 simd query foundation --help 631 ``` 632 633 #### params 634 635 The `params` command allows users to query for the parameters of `foundation`. 636 637 ```bash 638 simd query foundation params [flags] 639 ``` 640 641 Example: 642 643 ```bash 644 simd query foundation params 645 ``` 646 647 Example Output: 648 649 ```bash 650 params: 651 foundation_tax: "0.200000000000000000" 652 ``` 653 654 #### foundation-info 655 656 The `foundation-info` command allows users to query for the foundation info. 657 658 ```bash 659 simd query foundation foundation-info [flags] 660 ``` 661 662 Example: 663 664 ```bash 665 simd query foundation foundation-info 666 ``` 667 668 Example Output: 669 670 ```bash 671 info: 672 decision_policy: 673 '@type': /lbm.foundation.v1.ThresholdDecisionPolicy 674 threshold: "3.000000000000000000" 675 windows: 676 min_execution_period: 0s 677 voting_period: 86400s 678 total_weight: "3.000000000000000000" 679 version: "1" 680 ``` 681 682 #### member 683 684 The `member` command allows users to query for a foundation member by address. 685 686 ```bash 687 simd query foundation member [address] [flags] 688 ``` 689 690 Example: 691 692 ```bash 693 simd query foundation member link1... 694 ``` 695 696 Example Output: 697 698 ```bash 699 member: 700 added_at: "0001-01-01T00:00:00Z" 701 address: link1... 702 metadata: genesis member 703 ``` 704 705 #### members 706 707 The `members` command allows users to query for the foundation members with 708 pagination flags. 709 710 ```bash 711 simd query foundation members [flags] 712 ``` 713 714 Example: 715 716 ```bash 717 simd query foundation members 718 ``` 719 720 Example Output: 721 722 ```bash 723 members: 724 - added_at: "0001-01-01T00:00:00Z" 725 address: link1... 726 metadata: genesis member 727 - added_at: "0001-01-01T00:00:00Z" 728 address: link1... 729 metadata: genesis member 730 - added_at: "0001-01-01T00:00:00Z" 731 address: link1... 732 metadata: genesis member 733 pagination: 734 next_key: null 735 total: "3" 736 ``` 737 738 #### proposal 739 740 The `proposal` command allows users to query for proposal by id. 741 742 ```bash 743 simd query foundation proposal [id] [flags] 744 ``` 745 746 Example: 747 748 ```bash 749 simd query foundation proposal 1 750 ``` 751 752 Example Output: 753 754 ```bash 755 proposal: 756 executor_result: PROPOSAL_EXECUTOR_RESULT_NOT_RUN 757 final_tally_result: 758 abstain_count: "0.000000000000000000" 759 no_count: "0.000000000000000000" 760 no_with_veto_count: "0.000000000000000000" 761 yes_count: "0.000000000000000000" 762 foundation_version: "1" 763 id: "1" 764 messages: 765 - '@type': /lbm.foundation.v1.MsgWithdrawFromTreasury 766 authority: link1... 767 amount: 768 - amount: "1000000000" 769 denom: stake 770 to: link1... 771 metadata: show-me-the-money 772 proposers: 773 - link1... 774 status: PROPOSAL_STATUS_SUBMITTED 775 submit_time: "2022-09-19T01:26:38.544943184Z" 776 voting_period_end: "2022-09-20T01:26:38.544943184Z" 777 ``` 778 779 #### proposals 780 781 The `proposals` command allows users to query for proposals with pagination 782 flags. 783 784 ```bash 785 simd query foundation proposals [flags] 786 ``` 787 788 Example: 789 790 ```bash 791 simd query foundation proposals 792 ``` 793 794 Example Output: 795 796 ```bash 797 pagination: 798 next_key: null 799 total: "1" 800 proposals: 801 - executor_result: PROPOSAL_EXECUTOR_RESULT_NOT_RUN 802 final_tally_result: 803 abstain_count: "0.000000000000000000" 804 no_count: "0.000000000000000000" 805 no_with_veto_count: "0.000000000000000000" 806 yes_count: "0.000000000000000000" 807 foundation_version: "1" 808 id: "1" 809 messages: 810 - '@type': /lbm.foundation.v1.MsgWithdrawFromTreasury 811 authority: link1... 812 amount: 813 - amount: "1000000000" 814 denom: stake 815 to: link1... 816 metadata: show-me-the-money 817 proposers: 818 - link1... 819 status: PROPOSAL_STATUS_SUBMITTED 820 submit_time: "2022-09-19T01:26:38.544943184Z" 821 voting_period_end: "2022-09-20T01:26:38.544943184Z" 822 ``` 823 824 #### vote 825 826 The `vote` command allows users to query for vote by proposal id and voter 827 account address. 828 829 ```bash 830 simd query foundation vote [proposal-id] [voter] [flags] 831 ``` 832 833 Example: 834 835 ```bash 836 simd query foundation vote 1 link1... 837 ``` 838 839 Example Output: 840 841 ```bash 842 vote: 843 metadata: nope 844 option: VOTE_OPTION_NO 845 proposal_id: "1" 846 submit_time: "2022-09-19T01:35:30.920689570Z" 847 voter: link1... 848 ``` 849 850 #### votes 851 852 The `votes` command allows users to query for votes by proposal id with 853 pagination flags. 854 855 ```bash 856 simd query foundation votes [proposal-id] [flags] 857 ``` 858 859 Example: 860 861 ```bash 862 simd query foundation votes 1 863 ``` 864 865 Example Output: 866 867 ```bash 868 pagination: 869 next_key: null 870 total: "1" 871 votes: 872 - metadata: nope 873 option: VOTE_OPTION_NO 874 proposal_id: "1" 875 submit_time: "2022-09-19T01:35:30.920689570Z" 876 voter: link1... 877 ``` 878 879 #### tally 880 881 The `tally` command allows users to query for the tally in progress by its 882 proposal id. 883 884 ```bash 885 simd query foundation tally [proposal-id] [flags] 886 ``` 887 888 Example: 889 890 ```bash 891 simd query foundation tally 1 892 ``` 893 894 Example Output: 895 896 ```bash 897 tally: 898 abstain_count: "0.000000000000000000" 899 no_count: "1.000000000000000000" 900 no_with_veto_count: "0.000000000000000000" 901 yes_count: "0.000000000000000000" 902 ``` 903 904 #### censorships 905 906 The `censorships` command allows users to query for all the censorships. 907 908 ```bash 909 simd query foundation censorships [flags] 910 ``` 911 912 Example: 913 914 ```bash 915 simd query foundation censorships 916 ``` 917 918 Example Output: 919 920 ```bash 921 censorships: 922 - authority: CENSORSHIP_AUTHORITY_GOVERNANCE 923 msg_type_url: /cosmos.staking.v1beta1.MsgCreateValidator 924 - authority: CENSORSHIP_AUTHORITY_FOUNDATION 925 msg_type_url: /lbm.foundation.v1.MsgWithdrawFromTreasury 926 pagination: 927 next_key: null 928 total: "2" 929 ``` 930 931 #### grants 932 933 The `grants` command allows users to query grants for a grantee. If the message 934 type URL is set, it selects grants only for that message type. 935 936 ```bash 937 simd query foundation grants [grantee] [msg-type-url]? [flags] 938 ``` 939 940 Example: 941 942 ```bash 943 simd query foundation grants link1... /lbm.foundation.v1.MsgWithdrawFromTreasury 944 ``` 945 946 Example Output: 947 948 ```bash 949 authorizations: 950 - '@type': /lbm.foundation.v1.ReceiveFromTreasuryAuthorization 951 pagination: null 952 ``` 953 954 #### treasury 955 956 The `treasury` command allows users to query for the foundation treasury. 957 958 ```bash 959 simd query foundation treasury [flags] 960 ``` 961 962 Example: 963 964 ```bash 965 simd query foundation treasury 966 ``` 967 968 Example Output: 969 970 ```bash 971 amount: 972 - amount: "1000000000000.000000000000000000" 973 denom: stake 974 ``` 975 976 ### Transactions 977 978 The `tx` commands allow users to interact with the `foundation` module. 979 980 ```bash 981 simd tx foundation --help 982 ``` 983 984 **Note:** Some commands must be signed by the module's authority, which means 985 you cannot broadcast the message directly. The use of those commands is to make 986 it easier to generate the messages by end users. 987 988 #### update-members 989 990 The `update-members` command allows users to update the foundation's members. 991 992 ```bash 993 simd tx foundation update-members [authority] [members-json] [flags] 994 ``` 995 996 Example: 997 998 ```bash 999 simd tx foundation update-members link1... \ 1000 '[ 1001 { 1002 "address": "link1...", 1003 "metadata": "some new metadata" 1004 }, 1005 { 1006 "address": "link1...", 1007 "remove": true, 1008 } 1009 ]' 1010 ``` 1011 1012 **Note:** The signer MUST be the module's authority. 1013 1014 #### update-decision-policy 1015 1016 The `update-decision-policy` command allows users to update the foundation's 1017 decision policy. 1018 1019 ```bash 1020 simd tx foundation update-decision-policy [authority] [decision-policy-json] [flags] 1021 ``` 1022 1023 Example: 1024 1025 ```bash 1026 simd tx foundation update-decision-policy link1... \ 1027 '{ 1028 "@type": "/lbm.foundation.v1.ThresholdDecisionPolicy", 1029 "threshold": "4", 1030 "windows": { 1031 "voting_period": "1h", 1032 "min_execution_period": "0s" 1033 } 1034 }' 1035 ``` 1036 1037 **Note:** The signer MUST be the module's authority. 1038 1039 #### submit-proposal 1040 1041 The `submit-proposal` command allows users to submit a new proposal. 1042 1043 ```bash 1044 simd tx foundation submit-proposal [metadata] [proposers-json] [messages-json] [flags] 1045 ``` 1046 1047 Example: 1048 1049 ```bash 1050 simd tx foundation submit-proposal show-me-the-money \ 1051 '[ 1052 "link1...", 1053 "link1..." 1054 ]' \ 1055 '[ 1056 { 1057 "@type": "/lbm.foundation.v1.MsgWithdrawFromTreasury", 1058 "authority": "link1...", 1059 "to": "link1...", 1060 "amount": [ 1061 { 1062 "denom": "stake", 1063 "amount": "10000000000" 1064 } 1065 ] 1066 } 1067 ]' 1068 ``` 1069 1070 #### withdraw-proposal 1071 1072 The `withdraw-proposal` command allows users to withdraw a proposal. 1073 1074 ```bash 1075 simd tx foundation withdraw-proposal [proposal-id] [authority-or-proposer] [flags] 1076 ``` 1077 1078 Example: 1079 1080 ```bash 1081 simd tx foundation withdraw-proposal 1 link1... 1082 ``` 1083 1084 #### vote 1085 1086 The `vote` command allows users to vote on a proposal. 1087 1088 ```bash 1089 simd tx foundation vote [proposal-id] [voter] [option] [metadata] [flags] 1090 ``` 1091 1092 Example: 1093 1094 ```bash 1095 simd tx foundation vote 1 link1... VOTE_OPTION_NO nope 1096 ``` 1097 1098 #### exec 1099 1100 The `exec` command allows users to execute a proposal. 1101 1102 ```bash 1103 simd tx foundation exec [proposal-id] [flags] 1104 ``` 1105 1106 Example: 1107 1108 ```bash 1109 simd tx foundation exec 1 1110 ``` 1111 1112 #### leave-foundation 1113 1114 The `leave-foundation` command allows foundation member to leave the 1115 foundation. 1116 1117 ```bash 1118 simd tx foundation leave-foundation [address] [flags] 1119 ``` 1120 1121 Example: 1122 1123 ```bash 1124 simd tx foundation leave-foundation link1... 1125 ``` 1126 1127 #### update-censorship 1128 1129 The `update-censorship` command allows users to update a censorship information. 1130 1131 ```bash 1132 simd tx foundation update-censorship [authority] [msg-type-url] [new-authority] [flags] 1133 ``` 1134 1135 Example: 1136 1137 ```bash 1138 simd tx foundation update-censorship link1.. /lbm.foundation.v1.MsgWithdrawFromTreasury CENSORSHIP_AUTHORITY_UNSPECIFIED 1139 ``` 1140 1141 **Note:** The signer MUST be the current authority of the censorship. 1142 1143 #### grant 1144 1145 The `grant` command allows users to grant an authorization to a grantee. 1146 1147 ```bash 1148 simd tx foundation grant [authority] [grantee] [authorization-json] [flags] 1149 ``` 1150 1151 Example: 1152 1153 ```bash 1154 simd tx foundation grant link1.. link1... \ 1155 '{ 1156 "@type": "/lbm.foundation.v1.ReceiveFromTreasuryAuthorization", 1157 }' 1158 ``` 1159 1160 **Note:** The signer MUST be the authority of the censorship. 1161 1162 #### revoke 1163 1164 The `revoke` command allows users to revoke an authorization from a grantee. 1165 1166 ```bash 1167 simd tx foundation revoke [authority] [grantee] [msg-type-url] [flags] 1168 ``` 1169 1170 Example: 1171 1172 ```bash 1173 simd tx foundation revoke link1.. link1... /lbm.foundation.v1.MsgWithdrawFromTreasury 1174 ``` 1175 1176 **Note:** The signer MUST be the authority of the censorship. 1177 1178 #### fund-treasury 1179 1180 The `fund-treasury` command allows users to fund the foundation treasury. 1181 1182 ```bash 1183 simd tx foundation fund-treasury [from] [amount] [flags] 1184 ``` 1185 1186 Example: 1187 1188 ```bash 1189 simd tx foundation fund-treasury link1.. 1000stake 1190 ``` 1191 1192 #### withdraw-from-treasury 1193 1194 The `withdraw-from-treasury` command allows users to withdraw coins from the 1195 foundation treasury. 1196 1197 ```bash 1198 simd tx foundation withdraw-from-treasury [authority] [to] [amount] [flags] 1199 ``` 1200 1201 Example: 1202 1203 ```bash 1204 simd tx foundation withdraw-from-treasury link1.. link1... 1000stake 1205 ``` 1206 1207 **Note:** The signer MUST be the module's authority. 1208 1209 ## gRPC 1210 1211 A user can query the `foundation` module using gRPC endpoints. 1212 1213 ```bash 1214 grpcurl -plaintext \ 1215 localhost:9090 list lbm.foundation.v1.Query 1216 ``` 1217 1218 ### Params 1219 1220 The `Params` endpoint allows users to query for the parameters of `foundation`. 1221 1222 ```bash 1223 lbm.foundation.v1.Query/Params 1224 ``` 1225 1226 Example: 1227 1228 ```bash 1229 grpcurl -plaintext \ 1230 localhost:9090 lbm.foundation.v1.Query/Params 1231 ``` 1232 1233 Example Output: 1234 1235 ```bash 1236 { 1237 "params": { 1238 "foundationTax": "200000000000000000" 1239 } 1240 } 1241 ``` 1242 1243 ### FoundationInfo 1244 1245 The `FoundationInfo` endpoint allows users to query for the foundation info. 1246 1247 ```bash 1248 lbm.foundation.v1.Query/FoundationInfo 1249 ``` 1250 1251 Example: 1252 1253 ```bash 1254 grpcurl -plaintext \ 1255 localhost:9090 lbm.foundation.v1.Query/FoundationInfo 1256 ``` 1257 1258 Example Output: 1259 1260 ```bash 1261 { 1262 "info": { 1263 "version": "1", 1264 "totalWeight": "3000000000000000000", 1265 "decisionPolicy": {"@type":"/lbm.foundation.v1.ThresholdDecisionPolicy","threshold":"3000000000000000000","windows":{"votingPeriod":"86400s","minExecutionPeriod":"0s"}} 1266 } 1267 } 1268 ``` 1269 1270 ### Member 1271 1272 The `Member` endpoint allows users to query for a foundation member by address. 1273 1274 ```bash 1275 lbm.foundation.v1.Query/Member 1276 ``` 1277 1278 Example: 1279 1280 ```bash 1281 grpcurl -plaintext \ 1282 -d '{"address": "link1..."}' 1283 localhost:9090 lbm.foundation.v1.Query/Member 1284 ``` 1285 1286 Example Output: 1287 1288 ```bash 1289 { 1290 "member": { 1291 "address": "link1...", 1292 "metadata": "genesis member", 1293 "addedAt": "0001-01-01T00:00:00Z" 1294 } 1295 } 1296 ``` 1297 1298 ### Members 1299 1300 The `Members` endpoint allows users to query for the foundation members with 1301 pagination flags. 1302 1303 ```bash 1304 lbm.foundation.v1.Query/Members 1305 ``` 1306 1307 Example: 1308 1309 ```bash 1310 grpcurl -plaintext \ 1311 localhost:9090 lbm.foundation.v1.Query/Members 1312 ``` 1313 1314 Example Output: 1315 1316 ```bash 1317 { 1318 "members": [ 1319 { 1320 "address": "link1...", 1321 "metadata": "genesis member", 1322 "addedAt": "0001-01-01T00:00:00Z" 1323 }, 1324 { 1325 "address": "link1...", 1326 "metadata": "genesis member", 1327 "addedAt": "0001-01-01T00:00:00Z" 1328 }, 1329 { 1330 "address": "link1...", 1331 "metadata": "genesis member", 1332 "addedAt": "0001-01-01T00:00:00Z" 1333 } 1334 ], 1335 "pagination": { 1336 "total": "3" 1337 } 1338 } 1339 ``` 1340 1341 ### Proposal 1342 1343 The `Proposal` endpoint allows users to query for proposal by id. 1344 1345 ```bash 1346 lbm.foundation.v1.Query/Proposal 1347 ``` 1348 1349 Example: 1350 1351 ```bash 1352 grpcurl -plaintext \ 1353 -d '{"proposal_id": "1"}' \ 1354 localhost:9090 lbm.foundation.v1.Query/Proposal 1355 ``` 1356 1357 Example Output: 1358 1359 ```bash 1360 { 1361 "proposal": { 1362 "id": "1", 1363 "metadata": "show-me-the-money", 1364 "proposers": [ 1365 "link1..." 1366 ], 1367 "submitTime": "2022-09-19T01:26:38.544943184Z", 1368 "foundationVersion": "1", 1369 "status": "PROPOSAL_STATUS_SUBMITTED", 1370 "finalTallyResult": { 1371 "yesCount": "0", 1372 "abstainCount": "0", 1373 "noCount": "0", 1374 "noWithVetoCount": "0" 1375 }, 1376 "votingPeriodEnd": "2022-09-20T01:26:38.544943184Z", 1377 "executorResult": "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", 1378 "messages": [ 1379 {"@type":"/lbm.foundation.v1.MsgWithdrawFromTreasury","authority":"link1...","amount":[{"denom":"stake","amount":"1000000000"}],"to":"link1..."} 1380 ] 1381 } 1382 } 1383 ``` 1384 1385 ### Proposals 1386 1387 The `Proposals` endpoint allows users to query for proposals with pagination 1388 flags. 1389 1390 ```bash 1391 lbm.foundation.v1.Query/Proposals 1392 ``` 1393 1394 Example: 1395 1396 ```bash 1397 grpcurl -plaintext \ 1398 localhost:9090 lbm.foundation.v1.Query/Proposals 1399 ``` 1400 1401 Example Output: 1402 1403 ```bash 1404 { 1405 "proposals": [ 1406 { 1407 "id": "1", 1408 "metadata": "show-me-the-money", 1409 "proposers": [ 1410 "link1..." 1411 ], 1412 "submitTime": "2022-09-19T01:26:38.544943184Z", 1413 "foundationVersion": "1", 1414 "status": "PROPOSAL_STATUS_SUBMITTED", 1415 "finalTallyResult": { 1416 "yesCount": "0", 1417 "abstainCount": "0", 1418 "noCount": "0", 1419 "noWithVetoCount": "0" 1420 }, 1421 "votingPeriodEnd": "2022-09-20T01:26:38.544943184Z", 1422 "executorResult": "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", 1423 "messages": [ 1424 {"@type":"/lbm.foundation.v1.MsgWithdrawFromTreasury","authority":"link1...","amount":[{"denom":"stake","amount":"1000000000"}],"to":"link1..."} 1425 ] 1426 } 1427 ], 1428 "pagination": { 1429 "total": "1" 1430 } 1431 } 1432 ``` 1433 1434 ### Vote 1435 1436 The `Vote` endpoint allows users to query for vote by proposal id and voter account address. 1437 1438 ```bash 1439 lbm.foundation.v1.Query/Vote 1440 ``` 1441 1442 Example: 1443 1444 ```bash 1445 grpcurl -plaintext \ 1446 -d '{"proposal_id": "1", "voter": "link1..."}' \ 1447 localhost:9090 lbm.foundation.v1.Query/Vote 1448 ``` 1449 1450 Example Output: 1451 1452 ```bash 1453 { 1454 "vote": { 1455 "proposalId": "1", 1456 "voter": "link1...", 1457 "option": "VOTE_OPTION_NO", 1458 "metadata": "nope", 1459 "submitTime": "2022-09-19T01:35:30.920689570Z" 1460 } 1461 } 1462 ``` 1463 1464 ### Votes 1465 1466 The `Votes` endpoint allows users to query for votes by proposal id with 1467 pagination flags. 1468 1469 ```bash 1470 lbm.foundation.v1.Query/Votes 1471 ``` 1472 1473 Example: 1474 1475 ```bash 1476 grpcurl -plaintext \ 1477 -d '{"proposal_id": "1"}' \ 1478 localhost:9090 lbm.foundation.v1.Query/Votes 1479 ``` 1480 1481 Example Output: 1482 1483 ```bash 1484 { 1485 "votes": [ 1486 { 1487 "proposalId": "1", 1488 "voter": "link1...", 1489 "option": "VOTE_OPTION_NO", 1490 "metadata": "nope", 1491 "submitTime": "2022-09-19T01:35:30.920689570Z" 1492 } 1493 ], 1494 "pagination": { 1495 "total": "1" 1496 } 1497 } 1498 ``` 1499 1500 ### TallyResult 1501 1502 The `TallyResult` endpoint allows users to query for the tally in progress by 1503 its proposal id. 1504 1505 ```bash 1506 lbm.foundation.v1.Query/Vote 1507 ``` 1508 1509 Example: 1510 1511 ```bash 1512 grpcurl -plaintext \ 1513 -d '{"proposal_id": "1"}' \ 1514 localhost:9090 lbm.foundation.v1.Query/TallyResult 1515 ``` 1516 1517 Example Output: 1518 1519 ```bash 1520 { 1521 "tally": { 1522 "yesCount": "0", 1523 "abstainCount": "0", 1524 "noCount": "1000000000000000000", 1525 "noWithVetoCount": "0" 1526 } 1527 } 1528 ``` 1529 1530 ### Censorships 1531 1532 The `Censorships` endpoint allows users to query for all the censorships. 1533 1534 ```bash 1535 lbm.foundation.v1.Query/Censorships 1536 ``` 1537 1538 Example: 1539 1540 ```bash 1541 grpcurl -plaintext \ 1542 localhost:9090 lbm.foundation.v1.Query/Censorships 1543 ``` 1544 1545 Example Output: 1546 1547 ```bash 1548 { 1549 "censorships": [ 1550 { 1551 "msgTypeUrl": "/cosmos.staking.v1beta1.MsgCreateValidator", 1552 "authority": "CENSORSHIP_AUTHORITY_GOVERNANCE" 1553 }, 1554 { 1555 "msgTypeUrl": "/lbm.foundation.v1.MsgWithdrawFromTreasury", 1556 "authority": "CENSORSHIP_AUTHORITY_FOUNDATION" 1557 } 1558 ], 1559 "pagination": { 1560 "total": "2" 1561 } 1562 } 1563 ``` 1564 1565 ### Grants 1566 1567 The `Grants` endpoint allows users to query grants for a grantee. If the 1568 message type URL is set, it selects grants only for that message type. 1569 1570 ```bash 1571 lbm.foundation.v1.Query/Grants 1572 ``` 1573 1574 Example: 1575 1576 ```bash 1577 grpcurl -plaintext \ 1578 -d '{"grantee": "link1...", "msg_type_url": "/lbm.foundation.v1.MsgWithdrawFromTreasury"}' \ 1579 localhost:9090 lbm.foundation.v1.Query/Grants 1580 ``` 1581 1582 Example Output: 1583 1584 ```bash 1585 { 1586 "authorizations": [ 1587 {"@type":"/lbm.foundation.v1.ReceiveFromTreasuryAuthorization"} 1588 ] 1589 } 1590 ``` 1591 1592 ### Treasury 1593 1594 The `Treasury` endpoint allows users to query for the foundation treasury. 1595 1596 ```bash 1597 lbm.foundation.v1.Query/Treasury 1598 ``` 1599 1600 Example: 1601 1602 ```bash 1603 grpcurl -plaintext \ 1604 localhost:9090 lbm.foundation.v1.Query/Treasury 1605 ``` 1606 1607 Example Output: 1608 1609 ```bash 1610 { 1611 "amount": [ 1612 { 1613 "denom": "stake", 1614 "amount": "1000000000000000000000000000000" 1615 } 1616 ] 1617 } 1618 ```