utils

package
v0.0.0-...-1f47db2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColdStorageTransferJSON

type ColdStorageTransferJSON struct {
	Amount sdk.Coins `json:"amount" yaml:"amount"`
}

ColdStorageTransferJSON defines a parameter change used in JSON input. This allows values to be specified in raw JSON instead of being string encoded.

func NewColdStorageTransferJSON

func NewColdStorageTransferJSON(amount sdk.Coins) ColdStorageTransferJSON

func (ColdStorageTransferJSON) ToColdStorageTransfer

func (pcj ColdStorageTransferJSON) ToColdStorageTransfer() types.ColdStorageTransferProposal

ToColdStorageTransfer converts a ColdStorageTransferJSON object to ColdStorageTransfer.

type ColdStorageTransferProposalJSON

type ColdStorageTransferProposalJSON struct {
	Amount  sdk.Coins `json:"amount" yaml:"amount"`
	Deposit string    `json:"deposit" yaml:"deposit"`
}

ColdStorageTransferProposalJSON defines a ParameterChangeProposal with a deposit used to parse parameter change proposals from a JSON file.

func ParseColdStorageTransferProposalJSON

func ParseColdStorageTransferProposalJSON(cdc *codec.LegacyAmino, proposalFile string) (ColdStorageTransferProposalJSON, error)

ParseColdStorageTransferProposalJSON reads and parses a ColdStorageTransferProposalJSON from file.

type ColdStorageTransferProposalReq

type ColdStorageTransferProposalReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`

	Amount   sdk.Coins      `json:"amount" yaml:"amount"`
	Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins      `json:"deposit" yaml:"deposit"`
}

ColdStorageTransferProposalReq defines a parameter change proposal request body.

type ColdStorageTransfersJSON

type ColdStorageTransfersJSON []ColdStorageTransferJSON

ColdStorageTransfersJSON defines a slice of ColdStorageTransferJSON objects which can be converted to a slice of ColdStorageTransfer objects.

func (ColdStorageTransfersJSON) ToColdStorageTransfers

func (pcj ColdStorageTransfersJSON) ToColdStorageTransfers() []types.ColdStorageTransferProposal

ToColdStorageTransfers converts a slice of ColdStorageTransferJSON objects to a slice of ColdStorageTransfer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL