|
| 1 | +package upgrade |
| 2 | + |
| 3 | +import ( |
| 4 | + "encoding/json" |
| 5 | + |
| 6 | + upgradetypes "cosmossdk.io/x/upgrade/types" |
| 7 | + sdk "github.com/cosmos/cosmos-sdk/types" |
| 8 | +) |
| 9 | + |
| 10 | +// These files defines sdk specific types necessary to perform upgrade simulation. |
| 11 | +// we're not using SDK generated types to prevent import of different types of cosmos sdk |
| 12 | + |
| 13 | +type nodeStatus struct { |
| 14 | + SyncInfo struct { |
| 15 | + LatestBlockHeight string `json:"latest_block_height"` |
| 16 | + CatchingUp bool `json:"catching_up"` |
| 17 | + } `json:"sync_info"` |
| 18 | +} |
| 19 | + |
| 20 | +type votingParams struct { |
| 21 | + VotingPeriod string `json:"voting_period"` |
| 22 | +} |
| 23 | + |
| 24 | +type depositParams struct { |
| 25 | + MinDeposit sdk.Coins `json:"min_deposit"` |
| 26 | +} |
| 27 | + |
| 28 | +type govParams struct { |
| 29 | + VotingParams votingParams `json:"voting_params"` |
| 30 | + DepositParams depositParams `json:"deposit_params"` |
| 31 | +} |
| 32 | + |
| 33 | +type proposalResp struct { |
| 34 | + ID string `json:"id"` |
| 35 | + Title string `json:"title"` |
| 36 | +} |
| 37 | + |
| 38 | +type proposalsResp struct { |
| 39 | + Proposals []proposalResp `json:"proposals"` |
| 40 | +} |
| 41 | + |
| 42 | +type SoftwareUpgradeProposal struct { |
| 43 | + Type string `json:"@type"` |
| 44 | + Authority string `json:"authority"` |
| 45 | + Plan upgradetypes.Plan `json:"plan"` |
| 46 | +} |
| 47 | + |
| 48 | +type ProposalMsg struct { |
| 49 | + // Msgs defines an array of sdk.Msgs proto-JSON-encoded as Anys. |
| 50 | + Messages []json.RawMessage `json:"messages,omitempty"` |
| 51 | + Metadata string `json:"metadata"` |
| 52 | + Deposit string `json:"deposit"` |
| 53 | + Title string `json:"title"` |
| 54 | + Summary string `json:"summary"` |
| 55 | + Expedited bool `json:"expedited"` |
| 56 | +} |
0 commit comments