Documentation ¶
Index ¶
- func WriteToNewTempFile(t *testing.T, s string) *os.File
- type Fixtures
- func (f *Fixtures) AddGenesisAccount(address sdk.AccAddress, coins sdk.Coins, flags ...string)
- func (f *Fixtures) CLIConfig(key, value string, flags ...string)
- func (f *Fixtures) Cleanup(dirs ...string)
- func (f *Fixtures) CollectGenTxs(flags ...string)
- func (f *Fixtures) DDInit(moniker string, flags ...string)
- func (f *Fixtures) Flags() string
- func (f *Fixtures) GDStart(flags ...string) *tests.Process
- func (f *Fixtures) GDTendermint(query string) string
- func (f *Fixtures) GenTx(name string, flags ...string)
- func (f Fixtures) GenesisFile() string
- func (f Fixtures) GenesisState() simapp.GenesisState
- func (f *Fixtures) KeyAddress(name string) sdk.AccAddress
- func (f *Fixtures) KeysAdd(name string, flags ...string)
- func (f *Fixtures) KeysAddRecover(name, mnemonic string, flags ...string) (exitSuccess bool, stdout, stderr string)
- func (f *Fixtures) KeysAddRecoverHDPath(name, mnemonic string, account uint32, index uint32, flags ...string)
- func (f *Fixtures) KeysDelete(name string, flags ...string)
- func (f *Fixtures) KeysShow(name string, flags ...string) keys.KeyOutput
- func (f *Fixtures) QueryAccount(address sdk.AccAddress, flags ...string) auth.BaseAccount
- func (f *Fixtures) QueryGovDeposit(proposalID int, depositor sdk.AccAddress, flags ...string) gov.Deposit
- func (f *Fixtures) QueryGovDeposits(propsalID int, flags ...string) []gov.Deposit
- func (f *Fixtures) QueryGovParamDeposit() gov.DepositParams
- func (f *Fixtures) QueryGovParamTallying() gov.TallyParams
- func (f *Fixtures) QueryGovParamVoting() gov.VotingParams
- func (f *Fixtures) QueryGovProposal(proposalID int, flags ...string) gov.Proposal
- func (f *Fixtures) QueryGovProposals(flags ...string) gov.Proposals
- func (f *Fixtures) QueryGovVote(proposalID int, voter sdk.AccAddress, flags ...string) gov.Vote
- func (f *Fixtures) QueryGovVotes(proposalID int, flags ...string) []gov.Vote
- func (f *Fixtures) QueryPost(id string, flags ...string) postsTypes.PostQueryResponse
- func (f *Fixtures) QueryPosts(flags ...string) postsTypes.Posts
- func (f *Fixtures) QueryProfile(address sdk.AccAddress, flags ...string) profilesTypes.Profile
- func (f *Fixtures) QueryProfiles(flags ...string) profilesTypes.Profiles
- func (f *Fixtures) QueryReactions(flags ...string) postsTypes.Reactions
- func (f *Fixtures) QueryRelationships(flags ...string) map[string]relationshipsTypes.Relationships
- func (f *Fixtures) QueryReports(id string, flags ...string) reportsTypes.ReportsQueryResponse
- func (f *Fixtures) QueryRewards(delAddr sdk.AccAddress, flags ...string) distribution.QueryDelegatorTotalRewardsResponse
- func (f *Fixtures) QuerySigningInfo(val string) slashing.ValidatorSigningInfo
- func (f *Fixtures) QuerySlashingParams() slashing.Params
- func (f *Fixtures) QueryStakingDelegationsTo(valAddr sdk.ValAddress, flags ...string) []staking.Delegation
- func (f *Fixtures) QueryStakingParameters(flags ...string) staking.Params
- func (f *Fixtures) QueryStakingPool(flags ...string) staking.Pool
- func (f *Fixtures) QueryStakingUnbondingDelegationsFrom(valAddr sdk.ValAddress, flags ...string) []staking.UnbondingDelegation
- func (f *Fixtures) QueryStakingValidator(valAddr sdk.ValAddress, flags ...string) staking.Validator
- func (f *Fixtures) QueryTotalSupply(flags ...string) (totalSupply sdk.Coins)
- func (f *Fixtures) QueryTotalSupplyOf(denom string, flags ...string) sdk.Int
- func (f *Fixtures) QueryTxs(page, limit int, events ...string) *sdk.SearchTxsResult
- func (f *Fixtures) QueryTxsInvalid(expectedErr error, page, limit int, events ...string)
- func (f *Fixtures) QueryUserBlocks(user sdk.AccAddress, flags ...string) []relationshipsTypes.UserBlock
- func (f *Fixtures) QueryUserDTagRequests(user sdk.AccAddress, flags ...string) []profilesTypes.DTagTransferRequest
- func (f *Fixtures) QueryUserRelationships(user sdk.AccAddress, flags ...string) relationshipsTypes.Relationships
- func (f *Fixtures) TxBlockUser(blockedUser sdk.AccAddress, subspace, reason string, from sdk.AccAddress, ...) (bool, string, string)
- func (f *Fixtures) TxBroadcast(fileName string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxCreateRelationship(receiver sdk.AccAddress, subspace string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxDeleteUserRelationship(receiver sdk.AccAddress, subspace string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxEncode(fileName string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxGovDeposit(proposalID int, from string, amount sdk.Coin, flags ...string) (bool, string, string)
- func (f *Fixtures) TxGovSubmitProposal(from, typ, title, description string, deposit sdk.Coin, flags ...string) (bool, string, string)
- func (f *Fixtures) TxGovVote(proposalID int, option gov.VoteOption, from string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxMultisign(fileName, name string, signaturesFiles []string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxPostsAddReaction(id string, reaction string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxPostsAnswerPoll(pollID postsTypes.PostID, answers []postsTypes.AnswerID, from sdk.AccAddress, ...) (bool, string, string)
- func (f *Fixtures) TxPostsCreate(subspace, message string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxPostsEdit(id string, message string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxPostsRegisterReaction(shortCode, value, subspace string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxPostsRemoveReaction(id string, reaction string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxProfileAcceptDTagTransfer(newDtag string, receiver, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxProfileCancelDTagTransfer(owner, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxProfileDelete(from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxProfileRefuseDTagTransfer(sender, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxProfileRequestDTagTransfer(owner, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxProfileSave(dTag string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxReportPost(id, repType, repMess string, from sdk.AccAddress, flags ...string) (bool, string, string)
- func (f *Fixtures) TxSend(from string, to sdk.AccAddress, amount sdk.Coin, flags ...string) (bool, string, string)
- func (f *Fixtures) TxSign(signer, fileName string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxStakingCreateValidator(from, consPubKey string, amount sdk.Coin, flags ...string) (bool, string, string)
- func (f *Fixtures) TxStakingUnbond(from, shares string, validator sdk.ValAddress, flags ...string) bool
- func (f *Fixtures) TxUnblockUser(blockedUser sdk.AccAddress, subspace string, from sdk.AccAddress, ...) (bool, string, string)
- func (f *Fixtures) UnsafeResetAll(flags ...string)
- func (f *Fixtures) ValidateGenesis()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixtures ¶
type Fixtures struct { BuildDir string RootDir string DesmosBinary string DesmoscliBinary string ChainID string RPCAddr string Port string DesmosdHome string DesmoscliHome string P2PAddr string T *testing.T }
Fixtures is used to setup the testing environment
func InitFixtures ¶
InitFixtures is called at the beginning of a test and initializes a chain with 1 validator.
func NewFixtures ¶
NewFixtures creates a new instance of Fixtures with many vars set
func (*Fixtures) AddGenesisAccount ¶
AddGenesisAccount is desmosd add-genesis-account
func (*Fixtures) Cleanup ¶
Cleanup is meant to be run at the end of a test to clean up an remaining test state
func (*Fixtures) CollectGenTxs ¶
CollectGenTxs is desmosd collect-gentxs
func (*Fixtures) DDInit ¶
DDInit is desmosd init NOTE: DDInit sets the ChainID for the Fixtures instance
func (*Fixtures) GDStart ¶
GDStart runs desmosd start with the appropriate flags and returns a process
func (*Fixtures) GDTendermint ¶
GDTendermint returns the results of desmosd tendermint [query]
func (Fixtures) GenesisFile ¶
GenesisFile returns the path of the genesis file
func (Fixtures) GenesisState ¶
func (f Fixtures) GenesisState() simapp.GenesisState
GenesisFile returns the application's genesis state
func (*Fixtures) KeyAddress ¶
func (f *Fixtures) KeyAddress(name string) sdk.AccAddress
KeyAddress returns the SDK account address from the key
func (*Fixtures) KeysAddRecover ¶
func (f *Fixtures) KeysAddRecover(name, mnemonic string, flags ...string) (exitSuccess bool, stdout, stderr string)
KeysAddRecover prepares desmoscli keys add --recover
func (*Fixtures) KeysAddRecoverHDPath ¶
func (f *Fixtures) KeysAddRecoverHDPath(name, mnemonic string, account uint32, index uint32, flags ...string)
KeysAddRecoverHDPath prepares desmoscli keys add --recover --account --index
func (*Fixtures) KeysDelete ¶
KeysDelete is desmoscli keys delete
func (*Fixtures) QueryAccount ¶
func (f *Fixtures) QueryAccount(address sdk.AccAddress, flags ...string) auth.BaseAccount
QueryAccount is desmoscli query account
func (*Fixtures) QueryGovDeposit ¶
func (f *Fixtures) QueryGovDeposit(proposalID int, depositor sdk.AccAddress, flags ...string) gov.Deposit
QueryGovDeposit is desmoscli query gov deposit
func (*Fixtures) QueryGovDeposits ¶
QueryGovDeposits is desmoscli query gov deposits
func (*Fixtures) QueryGovParamDeposit ¶
func (f *Fixtures) QueryGovParamDeposit() gov.DepositParams
QueryGovParamDeposit is desmoscli query gov param deposit
func (*Fixtures) QueryGovParamTallying ¶
func (f *Fixtures) QueryGovParamTallying() gov.TallyParams
QueryGovParamTallying is desmoscli query gov param tallying
func (*Fixtures) QueryGovParamVoting ¶
func (f *Fixtures) QueryGovParamVoting() gov.VotingParams
QueryGovParamVoting is desmoscli query gov param voting
func (*Fixtures) QueryGovProposal ¶
QueryGovProposal is desmoscli query gov proposal
func (*Fixtures) QueryGovProposals ¶
QueryGovProposals is desmoscli query gov proposals
func (*Fixtures) QueryGovVote ¶
QueryGovVote is desmoscli query gov vote
func (*Fixtures) QueryGovVotes ¶
QueryGovVotes is desmoscli query gov votes
func (*Fixtures) QueryPost ¶
func (f *Fixtures) QueryPost(id string, flags ...string) postsTypes.PostQueryResponse
QueryPost returns a specific stored post
func (*Fixtures) QueryPosts ¶
func (f *Fixtures) QueryPosts(flags ...string) postsTypes.Posts
QueryPosts returns stored posts
func (*Fixtures) QueryProfile ¶ added in v0.13.0
func (f *Fixtures) QueryProfile(address sdk.AccAddress, flags ...string) profilesTypes.Profile
QueryProfile returns stored profile
func (*Fixtures) QueryProfiles ¶ added in v0.4.0
func (f *Fixtures) QueryProfiles(flags ...string) profilesTypes.Profiles
QueryProfile returns stored profiles
func (*Fixtures) QueryReactions ¶ added in v0.4.0
func (f *Fixtures) QueryReactions(flags ...string) postsTypes.Reactions
QueryReactions returns registered reactions
func (*Fixtures) QueryRelationships ¶ added in v0.11.0
func (f *Fixtures) QueryRelationships(flags ...string) map[string]relationshipsTypes.Relationships
QueryRelationships queries all the relationships that are stored
func (*Fixtures) QueryReports ¶ added in v0.7.0
func (f *Fixtures) QueryReports(id string, flags ...string) reportsTypes.ReportsQueryResponse
QueryReports returns stored reports associated to the id given
func (*Fixtures) QueryRewards ¶
func (f *Fixtures) QueryRewards(delAddr sdk.AccAddress, flags ...string) distribution.QueryDelegatorTotalRewardsResponse
QueryRewards returns the rewards of a delegator
func (*Fixtures) QuerySigningInfo ¶
func (f *Fixtures) QuerySigningInfo(val string) slashing.ValidatorSigningInfo
QuerySigningInfo returns the signing info for a validator
func (*Fixtures) QuerySlashingParams ¶
QuerySlashingParams is desmoscli query slashing params
func (*Fixtures) QueryStakingDelegationsTo ¶
func (f *Fixtures) QueryStakingDelegationsTo(valAddr sdk.ValAddress, flags ...string) []staking.Delegation
QueryStakingDelegationsTo is desmoscli query staking delegations-to
func (*Fixtures) QueryStakingParameters ¶
QueryStakingParameters is desmoscli query staking parameters
func (*Fixtures) QueryStakingPool ¶
QueryStakingPool is desmoscli query staking pool
func (*Fixtures) QueryStakingUnbondingDelegationsFrom ¶
func (f *Fixtures) QueryStakingUnbondingDelegationsFrom(valAddr sdk.ValAddress, flags ...string) []staking.UnbondingDelegation
QueryStakingUnbondingDelegationsFrom is desmoscli query staking unbonding-delegations-from
func (*Fixtures) QueryStakingValidator ¶
QueryStakingValidator is desmoscli query staking validator
func (*Fixtures) QueryTotalSupply ¶
QueryTotalSupply returns the total supply of coins
func (*Fixtures) QueryTotalSupplyOf ¶
QueryTotalSupplyOf returns the total supply of a given coin denom
func (*Fixtures) QueryTxs ¶
func (f *Fixtures) QueryTxs(page, limit int, events ...string) *sdk.SearchTxsResult
QueryTxs is desmoscli query txs
func (*Fixtures) QueryTxsInvalid ¶
QueryTxsInvalid query txs with wrong parameters and compare expected error
func (*Fixtures) QueryUserBlocks ¶ added in v0.12.0
func (f *Fixtures) QueryUserBlocks(user sdk.AccAddress, flags ...string) []relationshipsTypes.UserBlock
QueryUserBlocks returns store user blocks
func (*Fixtures) QueryUserDTagRequests ¶ added in v0.12.0
func (f *Fixtures) QueryUserDTagRequests(user sdk.AccAddress, flags ...string) []profilesTypes.DTagTransferRequest
QueryUserDTagRequests returns the user's stored requests
func (*Fixtures) QueryUserRelationships ¶ added in v0.13.0
func (f *Fixtures) QueryUserRelationships(user sdk.AccAddress, flags ...string) relationshipsTypes.Relationships
QueryUserRelationships returns stored relationships
func (*Fixtures) TxBlockUser ¶ added in v0.12.0
func (f *Fixtures) TxBlockUser(blockedUser sdk.AccAddress, subspace, reason string, from sdk.AccAddress, flags ...string) (bool, string, string)
func (*Fixtures) TxBroadcast ¶
TxBroadcast is desmoscli tx broadcast
func (*Fixtures) TxCreateRelationship ¶ added in v0.11.0
func (f *Fixtures) TxCreateRelationship(receiver sdk.AccAddress, subspace string, from sdk.AccAddress, flags ...string) (bool, string, string)
___________________________________________________________________________________ desmoscli tx relationships
func (*Fixtures) TxDeleteUserRelationship ¶ added in v0.11.0
func (f *Fixtures) TxDeleteUserRelationship(receiver sdk.AccAddress, subspace string, from sdk.AccAddress, flags ...string) (bool, string, string)
func (*Fixtures) TxGovDeposit ¶
func (f *Fixtures) TxGovDeposit(proposalID int, from string, amount sdk.Coin, flags ...string) (bool, string, string)
TxGovDeposit is desmoscli tx gov deposit
func (*Fixtures) TxGovSubmitProposal ¶
func (f *Fixtures) TxGovSubmitProposal(from, typ, title, description string, deposit sdk.Coin, flags ...string) (bool, string, string)
TxGovSubmitProposal is desmoscli tx gov submit-proposal
func (*Fixtures) TxGovVote ¶
func (f *Fixtures) TxGovVote(proposalID int, option gov.VoteOption, from string, flags ...string) (bool, string, string)
TxGovVote is desmoscli tx gov vote
func (*Fixtures) TxMultisign ¶
func (f *Fixtures) TxMultisign(fileName, name string, signaturesFiles []string, flags ...string) (bool, string, string)
TxMultisign is desmoscli tx multisign
func (*Fixtures) TxPostsAddReaction ¶
func (f *Fixtures) TxPostsAddReaction(id string, reaction string, from sdk.AccAddress, flags ...string) (bool, string, string)
TxPostsAddReaction is desmoscli tx posts add-reaction
func (*Fixtures) TxPostsAnswerPoll ¶
func (f *Fixtures) TxPostsAnswerPoll(pollID postsTypes.PostID, answers []postsTypes.AnswerID, from sdk.AccAddress, flags ...string) (bool, string, string)
TxPostsAnswerPoll is desmoscli tx posts answer-poll
func (*Fixtures) TxPostsCreate ¶
func (f *Fixtures) TxPostsCreate(subspace, message string, from sdk.AccAddress, flags ...string) (bool, string, string)
TxPostsCreate is desmoscli tx posts create
func (*Fixtures) TxPostsEdit ¶
func (f *Fixtures) TxPostsEdit(id string, message string, from sdk.AccAddress, flags ...string) (bool, string, string)
TxPostsEdit is desmoscli tx posts edit
func (*Fixtures) TxPostsRegisterReaction ¶ added in v0.4.0
func (f *Fixtures) TxPostsRegisterReaction(shortCode, value, subspace string, from sdk.AccAddress, flags ...string) (bool, string, string)
TxPostsRegisterReaction is desmoscli tx posts register-reaction
func (*Fixtures) TxPostsRemoveReaction ¶
func (f *Fixtures) TxPostsRemoveReaction(id string, reaction string, from sdk.AccAddress, flags ...string) (bool, string, string)
TxPostsRemoveReaction is desmoscli tx posts remove-reaction
func (*Fixtures) TxProfileAcceptDTagTransfer ¶ added in v0.12.0
func (*Fixtures) TxProfileCancelDTagTransfer ¶ added in v0.13.0
func (*Fixtures) TxProfileDelete ¶ added in v0.4.0
func (*Fixtures) TxProfileRefuseDTagTransfer ¶ added in v0.13.0
func (*Fixtures) TxProfileRequestDTagTransfer ¶ added in v0.12.0
func (*Fixtures) TxProfileSave ¶ added in v0.6.1
func (f *Fixtures) TxProfileSave(dTag string, from sdk.AccAddress, flags ...string) (bool, string, string)
___________________________________________________________________________________ desmoscli tx profiles
func (*Fixtures) TxReportPost ¶ added in v0.7.0
func (*Fixtures) TxSend ¶
func (f *Fixtures) TxSend(from string, to sdk.AccAddress, amount sdk.Coin, flags ...string) (bool, string, string)
TxSend is desmoscli tx send
func (*Fixtures) TxStakingCreateValidator ¶
func (f *Fixtures) TxStakingCreateValidator(from, consPubKey string, amount sdk.Coin, flags ...string) (bool, string, string)
TxStakingCreateValidator is desmoscli tx staking create-validator
func (*Fixtures) TxStakingUnbond ¶
func (f *Fixtures) TxStakingUnbond(from, shares string, validator sdk.ValAddress, flags ...string) bool
TxStakingUnbond is desmoscli tx staking unbond
func (*Fixtures) TxUnblockUser ¶ added in v0.12.0
func (f *Fixtures) TxUnblockUser(blockedUser sdk.AccAddress, subspace string, from sdk.AccAddress, flags ...string) (bool, string, string)
func (*Fixtures) UnsafeResetAll ¶
UnsafeResetAll is desmosd unsafe-reset-all
func (*Fixtures) ValidateGenesis ¶
func (f *Fixtures) ValidateGenesis()
ValidateGenesis runs desmosd validate-genesis