upgrade

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 7 Imported by: 0

README

Upgrade module

Usage

(Tx) Proposal software upgrade
softwareUpgradeMsg := types.SoftwareUpgradeMsg{
    UpgradeName: "Upgrade Name",
    Title: "Upgrade Title",
    Description: "Upgrade Description",
    UpgradeHeight:"6000",
    UpgradeInfo: `{"upgrade_info":"INFO"}`,
    Deposit: "1000",
}

txbytes, err := xplac.SoftwareUpgrade(softwareUpgradeMsg).CreateAndSignTx()
res, err := xplac.Broadcast(txbytes)
(Tx) Proposal cancel software upgrade
cancelSoftwareUpgradeMsg := types.CancelSoftwareUpgradeMsg {
    Title: "Cancel software upgrade",
    Description: "Cancel software upgrade description",
    Deposit: "1000",
}

txbytes, err := xplac.CancelSoftwareUpgrade(cancelSoftwareUpgradeMsg).CreateAndSignTx()
res, err := xplac.Broadcast(txbytes)
(Query) Upgrade applied
appliedMsg := types.AppliedMsg{
    UpgradeName: "upgrade-name",
}

res, err := xplac.UpgradeApplied(appliedMsg).Query()
(Query) Modules version
// Query specific module name
queryModulesVersionMsg := types.QueryModulesVersionMsg{
    ModuleName: "auth",
}

res, err := xplac.ModulesVersion(queryModulesVersionMsg).Query()

// Query all modules version
res, err := xplac.ModulesVersion().Query()
(Query) Upgrade plan
res, err := xplac.Plan().Query()

Documentation

Index

Constants

View Source
const (
	UpgradeModule                         = "upgrade"
	UpgradeProposalSoftwareUpgradeMsgType = "proposal-software-upgrade"
	UpgradeCancelSoftwareUpgradeMsgType   = "cancel-software-upgrade"
	UpgradeAppliedMsgType                 = "applied"
	UpgradeQueryModuleVersionsMsgType     = "upgrade-module-versions"
	UpgradeQueryAllModuleVersionsMsgType  = "upgrade-all-module-versions"
	UpgradePlanMsgType                    = "upgrade-plan"
)

Variables

This section is empty.

Functions

func MakeAppliedMsg

func MakeAppliedMsg(appliedMsg types.AppliedMsg) (upgradetypes.QueryAppliedPlanRequest, error)

(Query) make msg - applied

func MakeCancelSoftwareUpgradeMsg

func MakeCancelSoftwareUpgradeMsg(cancelSoftwareUpgradeMsg types.CancelSoftwareUpgradeMsg, privKey key.PrivateKey) (govtypes.MsgSubmitProposal, error)

(Tx) make msg - cancel software upgrade

func MakePlanMsg

(Query) make msg - plan

func MakeProposalSoftwareUpgradeMsg

func MakeProposalSoftwareUpgradeMsg(softwareUpgradeMsg types.SoftwareUpgradeMsg, privKey key.PrivateKey) (govtypes.MsgSubmitProposal, error)

(Tx) make msg - software upgrade

func MakeQueryAllModuleVersionMsg

func MakeQueryAllModuleVersionMsg() (upgradetypes.QueryModuleVersionsRequest, error)

(Query) make msg - all module versions

func MakeQueryModuleVersionMsg

func MakeQueryModuleVersionMsg(queryModulesVersionMsg types.QueryModulesVersionMsg) (upgradetypes.QueryModuleVersionsRequest, error)

(Query) make msg - module version

Types

This section is empty.

Jump to

Keyboard shortcuts

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