Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateUpgradeHeight(container string, binary string) (int64, int64, error)
- func CreateDid(payload cli.DIDDocument, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func CreateDidLegacy(payload didtypesv1.MsgCreateDidPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func CreateResource(payload types.MsgCreateResourcePayload, resourceFile string, ...) (sdk.TxResponse, error)
- func CreateResourceLegacy(collectionID string, resourceID string, resourceName string, ...) (sdk.TxResponse, error)
- func DeactivateDid(payload didtypesv2.MsgDeactivateDidDocPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func DeactivateDidLegacy(payload didtypesv1.MsgDeactivateDidPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func DepositGov(container string) (sdk.TxResponse, error)
- func Exec(args ...string) (string, error)
- func ExecDirect(args ...string) (string, error)
- func ExecWithEnv(env []string, args ...string) (string, error)
- func GetCurrentBlockHeight(container string, binary string) (int64, error)
- func GetVotingEndHeight(currentHeight int64) (int64, error)
- func LocalnetExec(envArgs []string, args ...string) (string, error)
- func LocalnetExecCopyAbsoluteWithPermissions(path string, destination string, container string) (string, error)
- func LocalnetExecDown() (string, error)
- func LocalnetExecExec(container string, args ...string) (string, error)
- func LocalnetExecRestorePermissions(path string, container string) (string, error)
- func LocalnetExecUp() (string, error)
- func MakeCodecWithExtendedRegistry() codec.Codec
- func Query(container string, binary string, module, query string, queryArgs ...string) (string, error)
- func QueryDid(did string, container string) (didtypesv2.QueryDidDocResponse, error)
- func QueryDidFeeParams(container, subspace, key string) (didtypes.FeeParams, error)
- func QueryDidLegacy(did string, container string) (didtypesv1.QueryGetDidResponse, error)
- func QueryModuleVersionMap(container string) (upgradetypes.QueryModuleVersionsResponse, error)
- func QueryParams(container, subspace, key string) (paramproposal.ParamChange, error)
- func QueryProposal(container, id string) (govtypesv1.Proposal, error)
- func QueryProposalLegacy(container, id string) (govtypesv1beta1.Proposal, error)
- func QueryResource(collectionID string, resourceID string, container string) (resourcetypesv2.QueryResourceResponse, error)
- func QueryResourceFeeParams(container, subspace, key string) (resourcetypes.FeeParams, error)
- func QueryResourceLegacy(collectionID string, resourceID string, container string) (resourcetypesv1.QueryResourceResponse, error)
- func SubmitParamChangeProposal(container string, pathToDir ...string) (sdk.TxResponse, error)
- func SubmitUpgradeProposal(upgradeHeight int64, container string) (sdk.TxResponse, error)
- func TrimExtraLineOffset(input string, offset int) string
- func Tx(container string, binary string, module, tx, from string, txArgs ...string) (sdk.TxResponse, error)
- func UpdateDid(payload cli.DIDDocument, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func UpdateDidLegacy(payload didtypesv1.MsgUpdateDidPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func VoteProposal(container, id, option string) (sdk.TxResponse, error)
- func WaitForCaughtUp(container string, binary string, period int64) error
- func WaitForChainHeight(container string, binary string, height int64, period int64) error
- type DefaultNodeInfo
- type DefaultNodeInfoOther
- type NodeStatus
- type OperatorAccountType
- type ProtocolVersion
- type SyncInfo
- type ValidatorInfo
Constants ¶
View Source
const ( CliBinaryName = integrationcli.CliBinaryName Green = integrationcli.Green Purple = integrationcli.Purple )
View Source
const ( KeyringBackend = integrationcli.KeyringBackend OutputFormat = integrationcli.OutputFormat Gas = integrationcli.Gas GasAdjustment = integrationcli.GasAdjustment GasPrices = integrationcli.GasPrices BootstrapPeriod = 20 BootstrapHeight = 1 VotingPeriod int64 = 10 ExpectedBlockSeconds int64 = 1 ExtraBlocks int64 = 5 UpgradeName = cheqdapp.UpgradeName DepositAmount = "10000000ncheq" NetworkConfigDir = "network-config" KeyringDir = "keyring-test" )
View Source
const ( DockerLocalnetPath = "../../../docker/localnet" DockerComposeFile = "docker-compose.yml" DockerComposeEnvML = "mainnet-latest.env" DockerComposeEnvBL = "build-latest.env" Docker = "docker" DockerCompose = "compose" DockerHome = "/home/cheqd" DockerUser = "cheqd" DockerUserGroup = "cheqd" Operator0 = "operator-0" Operator1 = "operator-1" Operator2 = "operator-2" Operator3 = "operator-3" Validator0 = "validator-0" Validator1 = "validator-1" Validator2 = "validator-2" Validator3 = "validator-3" ValidatorsCount = 4 )
Variables ¶
View Source
var ( TXParams = []string{ "--keyring-backend", KeyringBackend, "--chain-id", integrationnetwork.ChainID, "-y", } GasParams = []string{ "--gas", Gas, "--gas-adjustment", GasAdjustment, "--gas-prices", GasPrices, } QueryParamsConst = []string{ "--chain-id", integrationnetwork.ChainID, "--output", OutputFormat, } )
View Source
var ( DockerComposeLatestArgs = []string{ "-f", filepath.Join(DockerLocalnetPath, DockerComposeFile), "--env-file", filepath.Join(DockerLocalnetPath, DockerComposeEnvML), } DockerComposeBuildArgs = []string{ "-f", filepath.Join(DockerLocalnetPath, DockerComposeFile), "--env-file", filepath.Join(DockerLocalnetPath, DockerComposeEnvBL), } )
View Source
var OperatorAccounts = OperatorAccountType{ Validator0: Operator0, Validator1: Operator1, Validator2: Operator2, Validator3: Operator3, }
View Source
var ValidatorNodes = []string{Validator0, Validator1, Validator2, Validator3}
Functions ¶
func CalculateUpgradeHeight ¶
func CreateDid ¶
func CreateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, versionID, fees string) (sdk.TxResponse, error)
func CreateDidLegacy ¶
func CreateDidLegacy(payload didtypesv1.MsgCreateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func CreateResource ¶
func CreateResource(payload types.MsgCreateResourcePayload, resourceFile string, signInputs []cli.SignInput, container, fees string) (sdk.TxResponse, error)
func CreateResourceLegacy ¶
func DeactivateDid ¶
func DeactivateDid(payload didtypesv2.MsgDeactivateDidDocPayload, signInputs []cli.SignInput, container string, fees string) (sdk.TxResponse, error)
func DeactivateDidLegacy ¶
func DeactivateDidLegacy(payload didtypesv1.MsgDeactivateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func DepositGov ¶
func DepositGov(container string) (sdk.TxResponse, error)
func ExecDirect ¶
func GetCurrentBlockHeight ¶
func GetVotingEndHeight ¶
func LocalnetExecDown ¶
func LocalnetExecUp ¶
func QueryDid ¶
func QueryDid(did string, container string) (didtypesv2.QueryDidDocResponse, error)
func QueryDidFeeParams ¶
func QueryDidLegacy ¶
func QueryDidLegacy(did string, container string) (didtypesv1.QueryGetDidResponse, error)
func QueryModuleVersionMap ¶
func QueryModuleVersionMap(container string) (upgradetypes.QueryModuleVersionsResponse, error)
func QueryParams ¶
func QueryParams(container, subspace, key string) (paramproposal.ParamChange, error)
func QueryProposal ¶
func QueryProposal(container, id string) (govtypesv1.Proposal, error)
func QueryProposalLegacy ¶
func QueryProposalLegacy(container, id string) (govtypesv1beta1.Proposal, error)
func QueryResource ¶
func QueryResource(collectionID string, resourceID string, container string) (resourcetypesv2.QueryResourceResponse, error)
func QueryResourceFeeParams ¶
func QueryResourceFeeParams(container, subspace, key string) (resourcetypes.FeeParams, error)
func QueryResourceLegacy ¶
func QueryResourceLegacy(collectionID string, resourceID string, container string) (resourcetypesv1.QueryResourceResponse, error)
func SubmitParamChangeProposal ¶
func SubmitParamChangeProposal(container string, pathToDir ...string) (sdk.TxResponse, error)
func SubmitUpgradeProposal ¶
func SubmitUpgradeProposal(upgradeHeight int64, container string) (sdk.TxResponse, error)
func TrimExtraLineOffset ¶
func UpdateDid ¶
func UpdateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, versionID, fees string) (sdk.TxResponse, error)
func UpdateDidLegacy ¶
func UpdateDidLegacy(payload didtypesv1.MsgUpdateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func VoteProposal ¶
func VoteProposal(container, id, option string) (sdk.TxResponse, error)
Types ¶
type DefaultNodeInfo ¶
type DefaultNodeInfo struct { ProtocolVersion ProtocolVersion `json:"protocol_version"` ID string `json:"id"` ListenAddr string `json:"listen_addr"` Network string `json:"network"` Version string `json:"version"` Channels tmbytes.HexBytes `json:"channels"` Moniker string `json:"moniker"` Other DefaultNodeInfoOther `json:"other"` }
type DefaultNodeInfoOther ¶
type NodeStatus ¶
type NodeStatus struct { NodeInfo DefaultNodeInfo `json:"NodeInfo"` SyncInfo SyncInfo `json:"SyncInfo"` ValidatorInfo ValidatorInfo `json:"ValidatorInfo"` }
The following structs are overridden from the tendermint codebase. They are used to parse the output of the `status` command. We need to override them because the tendermint codebase types are overridden by the cosmos-sdk codebase types. Also, ValidatorInfo.PubKey is replaced with cosmos-sdk crypto.PubKey, hence it needs to be parsed accordingly.
func GetNodeStatus ¶
func GetNodeStatus(container string, binary string) (NodeStatus, error)
type OperatorAccountType ¶ added in v1.1.0
type ProtocolVersion ¶
type SyncInfo ¶
type SyncInfo struct { LatestBlockHash tmbytes.HexBytes `json:"latest_block_hash"` LatestAppHash tmbytes.HexBytes `json:"latest_app_hash"` LatestBlockHeight int64 `json:"latest_block_height,string"` LatestBlockTime time.Time `json:"latest_block_time"` EarliestBlockHash tmbytes.HexBytes `json:"earliest_block_hash"` EarliestAppHash tmbytes.HexBytes `json:"earliest_app_hash"` EarliestBlockHeight int64 `json:"earliest_block_height,string"` EarliestBlockTime time.Time `json:"earliest_block_time"` CatchingUp bool `json:"catching_up"` }
type ValidatorInfo ¶
Click to show internal directories.
Click to hide internal directories.