Documentation ¶
Index ¶
- func AllValsVoteOnProposal(chain *Config, propNumber int)
- type Config
- func (c *Config) AddBurnTaxExemptionAddressProposal(chainANode *NodeConfig, addresses ...string)
- func (c *Config) CreateNode(initNode *initialization.Node) *NodeConfig
- func (c *Config) GetDefaultNode() (*NodeConfig, error)
- func (c *Config) GetPersistentPeers() []string
- func (c *Config) RemoveNode(nodeName string) error
- func (c *Config) WaitForNumHeights(heightsToWait int64)
- func (c *Config) WaitUntilHeight(height int64)
- type NodeConfig
- func (n *NodeConfig) BankMultiSend(amount string, split bool, sendAddress string, receiveAddresses ...string)
- func (n *NodeConfig) BankSend(amount string, sendAddress string, receiveAddress string)
- func (n *NodeConfig) BankSendFeeGrantWithWallet(amount string, sendAddress string, receiveAddress string, feeGranter string, ...)
- func (n *NodeConfig) BankSendWithWallet(amount string, sendAddress string, receiveAddress string, walletName string)
- func (n *NodeConfig) CreateWallet(walletName string) string
- func (n *NodeConfig) DepositProposal(proposalNumber int)
- func (n *NodeConfig) FailIBCTransfer(from, recipient, amount string)
- func (n *NodeConfig) GetHostPort(portID string) (string, error)
- func (n *NodeConfig) GetWallet(walletName string) string
- func (n *NodeConfig) GrantAddress(granter, gratee string, spendLimit string, walletName string)
- func (n *NodeConfig) Instantiate2WasmContract(codeID, initMsg, salt, amount, fee, gas, from string)
- func (n *NodeConfig) InstantiateWasmContract(codeID, initMsg, amount, from string)
- func (n *NodeConfig) LogActionF(msg string, args ...interface{})
- func (n *NodeConfig) QueryBalances(address string) (sdk.Coins, error)
- func (n *NodeConfig) QueryBurnTaxExemptionList() ([]string, error)
- func (n *NodeConfig) QueryContractsFromID(codeID int) ([]string, error)
- func (n *NodeConfig) QueryCurrentHeight() (int64, error)
- func (n *NodeConfig) QueryGRPCGateway(path string, parameters ...string) ([]byte, error)
- func (n *NodeConfig) QueryHashFromBlock(height int64) (string, error)
- func (n *NodeConfig) QueryLatestBlockTime() time.Time
- func (n *NodeConfig) QueryLatestWasmCodeID() uint64
- func (n *NodeConfig) QueryListSnapshots() ([]*tmabcitypes.Snapshot, error)
- func (n *NodeConfig) QueryParams(subspace, key string, result any)
- func (n *NodeConfig) QueryPropStatus(proposalNumber int) (string, error)
- func (n *NodeConfig) QuerySpecificBalance(addr, denom string) (sdk.Coin, error)
- func (n *NodeConfig) QuerySupplyOf(denom string) (math.Int, error)
- func (n *NodeConfig) QueryTaxRate() (sdk.Dec, error)
- func (n *NodeConfig) QueryWasmSmart(contract string, msg string) (interface{}, error)
- func (n *NodeConfig) Run() error
- func (n *NodeConfig) SendIBCTransfer(from, recipient, amount, memo string)
- func (n *NodeConfig) Status() (resultStatus, error)
- func (n *NodeConfig) Stop() error
- func (n *NodeConfig) StoreWasmCode(wasmFile, from string)
- func (n *NodeConfig) SubmitAddBurnTaxExemptionAddressProposal(addresses []string, walletName string) int
- func (n *NodeConfig) SubmitParamChangeProposal(proposalJSON, from string)
- func (n *NodeConfig) SubmitTextProposal(text string, initialDeposit sdk.Coin)
- func (n *NodeConfig) VoteNoProposal(from string, proposalNumber int)
- func (n *NodeConfig) VoteYesProposal(from string, proposalNumber int)
- func (n *NodeConfig) WaitUntil(doneCondition func(syncInfo coretypes.SyncInfo) bool)
- func (n *NodeConfig) WasmExecute(contract, execMsg, amount, fee, from string)
- func (n *NodeConfig) WithSetupTime(t time.Time) *NodeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllValsVoteOnProposal ¶
Types ¶
type Config ¶
type Config struct { initialization.ChainMeta ValidatorInitConfigs []*initialization.NodeConfig // voting period is number of blocks it takes to deposit, 1.2 seconds per validator to vote on the prop, and a buffer. VotingPeriod float32 ExpeditedVotingPeriod float32 // upgrade proposal height for chain. UpgradePropHeight int64 LatestProposalNumber int LatestLockNumber int NodeConfigs []*NodeConfig LatestCodeID int // contains filtered or unexported fields }
func New ¶
func New(t *testing.T, containerManager *containers.Manager, id string, initValidatorConfigs []*initialization.NodeConfig) *Config
func (*Config) AddBurnTaxExemptionAddressProposal ¶
func (c *Config) AddBurnTaxExemptionAddressProposal(chainANode *NodeConfig, addresses ...string)
func (*Config) CreateNode ¶
func (c *Config) CreateNode(initNode *initialization.Node) *NodeConfig
CreateNode returns new initialized NodeConfig.
func (*Config) GetDefaultNode ¶
func (c *Config) GetDefaultNode() (*NodeConfig, error)
func (*Config) GetPersistentPeers ¶
GetPersistentPeers returns persistent peers from every node associated with a chain.
func (*Config) RemoveNode ¶
RemoveNode removes node and stops it from running.
func (*Config) WaitForNumHeights ¶
WaitForNumHeights waits for all nodes to go through a given number of heights.
func (*Config) WaitUntilHeight ¶
WaitUntilHeight waits for all validators to reach the specified height at the minimum. returns error, if any.
type NodeConfig ¶
type NodeConfig struct { initialization.Node OperatorAddress string SnapshotInterval uint64 // contains filtered or unexported fields }
func NewNodeConfig ¶
func NewNodeConfig(t *testing.T, initNode *initialization.Node, initConfig *initialization.NodeConfig, chainID string, containerManager *containers.Manager) *NodeConfig
NewNodeConfig returens new initialized NodeConfig.
func (*NodeConfig) BankMultiSend ¶
func (n *NodeConfig) BankMultiSend(amount string, split bool, sendAddress string, receiveAddresses ...string)
func (*NodeConfig) BankSend ¶
func (n *NodeConfig) BankSend(amount string, sendAddress string, receiveAddress string)
func (*NodeConfig) BankSendFeeGrantWithWallet ¶
func (*NodeConfig) BankSendWithWallet ¶
func (n *NodeConfig) BankSendWithWallet(amount string, sendAddress string, receiveAddress string, walletName string)
func (*NodeConfig) CreateWallet ¶
func (n *NodeConfig) CreateWallet(walletName string) string
func (*NodeConfig) DepositProposal ¶
func (n *NodeConfig) DepositProposal(proposalNumber int)
func (*NodeConfig) FailIBCTransfer ¶
func (n *NodeConfig) FailIBCTransfer(from, recipient, amount string)
func (*NodeConfig) GetHostPort ¶
func (n *NodeConfig) GetHostPort(portID string) (string, error)
func (*NodeConfig) GetWallet ¶
func (n *NodeConfig) GetWallet(walletName string) string
func (*NodeConfig) GrantAddress ¶
func (n *NodeConfig) GrantAddress(granter, gratee string, spendLimit string, walletName string)
func (*NodeConfig) Instantiate2WasmContract ¶
func (n *NodeConfig) Instantiate2WasmContract(codeID, initMsg, salt, amount, fee, gas, from string)
func (*NodeConfig) InstantiateWasmContract ¶
func (n *NodeConfig) InstantiateWasmContract(codeID, initMsg, amount, from string)
func (*NodeConfig) LogActionF ¶
func (n *NodeConfig) LogActionF(msg string, args ...interface{})
func (*NodeConfig) QueryBalances ¶
func (n *NodeConfig) QueryBalances(address string) (sdk.Coins, error)
QueryBalancer returns balances at the address.
func (*NodeConfig) QueryBurnTaxExemptionList ¶
func (n *NodeConfig) QueryBurnTaxExemptionList() ([]string, error)
func (*NodeConfig) QueryContractsFromID ¶
func (n *NodeConfig) QueryContractsFromID(codeID int) ([]string, error)
func (*NodeConfig) QueryCurrentHeight ¶
func (n *NodeConfig) QueryCurrentHeight() (int64, error)
QueryCurrentHeight returns the current block height of the node or error.
func (*NodeConfig) QueryGRPCGateway ¶
func (n *NodeConfig) QueryGRPCGateway(path string, parameters ...string) ([]byte, error)
func (*NodeConfig) QueryHashFromBlock ¶
func (n *NodeConfig) QueryHashFromBlock(height int64) (string, error)
QueryHashFromBlock gets block hash at a specific height. Otherwise, error.
func (*NodeConfig) QueryLatestBlockTime ¶
func (n *NodeConfig) QueryLatestBlockTime() time.Time
QueryLatestBlockTime returns the latest block time.
func (*NodeConfig) QueryLatestWasmCodeID ¶
func (n *NodeConfig) QueryLatestWasmCodeID() uint64
func (*NodeConfig) QueryListSnapshots ¶
func (n *NodeConfig) QueryListSnapshots() ([]*tmabcitypes.Snapshot, error)
QueryListSnapshots gets all snapshots currently created for a node.
func (*NodeConfig) QueryParams ¶
func (n *NodeConfig) QueryParams(subspace, key string, result any)
QueryParams extracts the params for a given subspace and key. This is done generically via json to avoid having to specify the QueryParamResponse type (which may not exist for all params).
func (*NodeConfig) QueryPropStatus ¶
func (n *NodeConfig) QueryPropStatus(proposalNumber int) (string, error)
func (*NodeConfig) QuerySpecificBalance ¶
func (n *NodeConfig) QuerySpecificBalance(addr, denom string) (sdk.Coin, error)
if coin is zero, return empty coin.
func (*NodeConfig) QuerySupplyOf ¶
func (n *NodeConfig) QuerySupplyOf(denom string) (math.Int, error)
func (*NodeConfig) QueryTaxRate ¶
func (n *NodeConfig) QueryTaxRate() (sdk.Dec, error)
func (*NodeConfig) QueryWasmSmart ¶
func (n *NodeConfig) QueryWasmSmart(contract string, msg string) (interface{}, error)
func (*NodeConfig) Run ¶
func (n *NodeConfig) Run() error
Run runs a node container for the given nodeIndex. The node configuration must be already added to the chain config prior to calling this method.
func (*NodeConfig) SendIBCTransfer ¶
func (n *NodeConfig) SendIBCTransfer(from, recipient, amount, memo string)
func (*NodeConfig) Status ¶
func (n *NodeConfig) Status() (resultStatus, error)
func (*NodeConfig) Stop ¶
func (n *NodeConfig) Stop() error
Stop stops the node from running and removes its container.
func (*NodeConfig) StoreWasmCode ¶
func (n *NodeConfig) StoreWasmCode(wasmFile, from string)
func (*NodeConfig) SubmitAddBurnTaxExemptionAddressProposal ¶
func (n *NodeConfig) SubmitAddBurnTaxExemptionAddressProposal(addresses []string, walletName string) int
func (*NodeConfig) SubmitParamChangeProposal ¶
func (n *NodeConfig) SubmitParamChangeProposal(proposalJSON, from string)
func (*NodeConfig) SubmitTextProposal ¶
func (n *NodeConfig) SubmitTextProposal(text string, initialDeposit sdk.Coin)
func (*NodeConfig) VoteNoProposal ¶
func (n *NodeConfig) VoteNoProposal(from string, proposalNumber int)
func (*NodeConfig) VoteYesProposal ¶
func (n *NodeConfig) VoteYesProposal(from string, proposalNumber int)
func (*NodeConfig) WaitUntil ¶
func (n *NodeConfig) WaitUntil(doneCondition func(syncInfo coretypes.SyncInfo) bool)
WaitUntil waits until node reaches doneCondition. Return nil if reached, error otherwise.
func (*NodeConfig) WasmExecute ¶
func (n *NodeConfig) WasmExecute(contract, execMsg, amount, fee, from string)
func (*NodeConfig) WithSetupTime ¶
func (n *NodeConfig) WithSetupTime(t time.Time) *NodeConfig