Documentation ¶
Index ¶
- type Config
- func (c *Config) CreateNode(initNode *initialization.Node) *NodeConfig
- func (c *Config) EnableSuperfluidAsset(denom string)
- func (c *Config) GetDefaultNode() (*NodeConfig, error)
- func (c *Config) GetPersistentPeers() []string
- func (c *Config) LockAndAddToExistingLock(amount sdk.Int, denom, lockupWalletAddr, lockupWalletSuperfluidAddr string)
- func (c *Config) RemoveNode(nodeName string) error
- func (c *Config) SendIBC(dstChain *Config, recipient string, token sdk.Coin)
- func (c *Config) WaitUntilHeight(height int64) error
- type NodeConfig
- func (n *NodeConfig) AddToExistingLock(tokens sdk.Int, denom, duration, from string)
- func (n *NodeConfig) BankSend(amount string, sendAddress string, receiveAddress string)
- func (n *NodeConfig) CreatePool(poolFile, from string) uint64
- func (n *NodeConfig) CreateWallet(walletName string) string
- func (n *NodeConfig) DepositProposal(proposalNumber int, isExpedited bool)
- func (n *NodeConfig) GetHostPort(portId string) (string, error)
- func (n *NodeConfig) GetWallet(walletName string) string
- func (n *NodeConfig) LockTokens(tokens string, duration string, from string)
- func (n *NodeConfig) LogActionF(msg string, args ...interface{})
- func (n *NodeConfig) QueryBalances(address string) (sdk.Coins, error)
- func (n *NodeConfig) QueryCurrentEpoch(identifier string) int64
- func (n *NodeConfig) QueryCurrentHeight() int64
- func (n *NodeConfig) QueryGRPCGateway(path string, parameters ...string) ([]byte, error)
- func (n *NodeConfig) QueryHashFromBlock(height int64) (string, error)
- func (n *NodeConfig) QueryIntermediaryAccount(denom string, valAddr string) (int, error)
- func (n *NodeConfig) QueryListSnapshots() ([]*tmabcitypes.Snapshot, error)
- func (n *NodeConfig) QueryPropStatus(proposalNumber int) (string, error)
- func (n *NodeConfig) QueryPropStatusTimed(proposalNumber int, desiredStatus string, totalTime chan time.Duration)
- func (n *NodeConfig) QueryPropTally(proposalNumber int) (sdk.Int, sdk.Int, sdk.Int, sdk.Int, error)
- func (n *NodeConfig) Run() error
- func (n *NodeConfig) Stop() error
- func (n *NodeConfig) SubmitSuperfluidProposal(asset string, initialDeposit sdk.Coin)
- func (n *NodeConfig) SubmitTextProposal(text string, initialDeposit sdk.Coin, isExpedited bool)
- func (n *NodeConfig) SubmitUpgradeProposal(upgradeVersion string, upgradeHeight int64, initialDeposit sdk.Coin)
- func (n *NodeConfig) SuperfluidDelegate(lockNumber int, valAddress string, from string)
- func (n *NodeConfig) SwapExactAmountIn(tokenInCoin, tokenOutMinAmountInt string, swapRoutePoolIds string, ...)
- 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) error
- func (n *NodeConfig) WithSetupTime(t time.Time) *NodeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 // contains filtered or unexported fields }
func New ¶
func New(t *testing.T, containerManager *containers.Manager, id string, initValidatorConfigs []*initialization.NodeConfig) *Config
func (*Config) CreateNode ¶
func (c *Config) CreateNode(initNode *initialization.Node) *NodeConfig
CreateNode returns new initialized NodeConfig.
func (*Config) EnableSuperfluidAsset ¶
func (*Config) GetDefaultNode ¶
func (c *Config) GetDefaultNode() (*NodeConfig, error)
GetDefaultNode returns the default node of the chain. The default node is the first one created. Returns error if no ndoes created.
func (*Config) GetPersistentPeers ¶
GetPersistentPeers returns persistent peers from every node associated with a chain.
func (*Config) LockAndAddToExistingLock ¶
func (*Config) RemoveNode ¶
RemoveNode removes node and stops it from running.
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) AddToExistingLock ¶
func (n *NodeConfig) AddToExistingLock(tokens sdk.Int, denom, duration, from string)
func (*NodeConfig) BankSend ¶
func (n *NodeConfig) BankSend(amount string, sendAddress string, receiveAddress string)
func (*NodeConfig) CreatePool ¶
func (n *NodeConfig) CreatePool(poolFile, from string) uint64
func (*NodeConfig) CreateWallet ¶
func (n *NodeConfig) CreateWallet(walletName string) string
func (*NodeConfig) DepositProposal ¶
func (n *NodeConfig) DepositProposal(proposalNumber int, isExpedited bool)
func (*NodeConfig) GetHostPort ¶
func (n *NodeConfig) GetHostPort(portId string) (string, error)
func (*NodeConfig) GetWallet ¶
func (n *NodeConfig) GetWallet(walletName string) string
func (*NodeConfig) LockTokens ¶
func (n *NodeConfig) LockTokens(tokens string, duration string, 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) QueryCurrentEpoch ¶
func (n *NodeConfig) QueryCurrentEpoch(identifier string) int64
func (*NodeConfig) QueryCurrentHeight ¶
func (n *NodeConfig) QueryCurrentHeight() int64
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) QueryIntermediaryAccount ¶
func (n *NodeConfig) QueryIntermediaryAccount(denom string, valAddr string) (int, error)
func (*NodeConfig) QueryListSnapshots ¶
func (n *NodeConfig) QueryListSnapshots() ([]*tmabcitypes.Snapshot, error)
QueryListSnapshots gets all snapshots currently created for a node.
func (*NodeConfig) QueryPropStatus ¶
func (n *NodeConfig) QueryPropStatus(proposalNumber int) (string, error)
func (*NodeConfig) QueryPropStatusTimed ¶
func (n *NodeConfig) QueryPropStatusTimed(proposalNumber int, desiredStatus string, totalTime chan time.Duration)
func (*NodeConfig) QueryPropTally ¶
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) Stop ¶
func (n *NodeConfig) Stop() error
Stop stops the node from running and removes its container.
func (*NodeConfig) SubmitSuperfluidProposal ¶
func (n *NodeConfig) SubmitSuperfluidProposal(asset string, initialDeposit sdk.Coin)
func (*NodeConfig) SubmitTextProposal ¶
func (n *NodeConfig) SubmitTextProposal(text string, initialDeposit sdk.Coin, isExpedited bool)
func (*NodeConfig) SubmitUpgradeProposal ¶
func (n *NodeConfig) SubmitUpgradeProposal(upgradeVersion string, upgradeHeight int64, initialDeposit sdk.Coin)
func (*NodeConfig) SuperfluidDelegate ¶
func (n *NodeConfig) SuperfluidDelegate(lockNumber int, valAddress string, from string)
func (*NodeConfig) SwapExactAmountIn ¶
func (n *NodeConfig) SwapExactAmountIn(tokenInCoin, tokenOutMinAmountInt string, swapRoutePoolIds string, swapRouteDenoms string, from string)
SwapExactAmountIn swaps tokenInCoin to get at least tokenOutMinAmountInt of the other token's pool out. swapRoutePoolIds is the comma separated list of pool ids to swap through. swapRouteDenoms is the comma separated list of denoms to swap through. To reproduce locally: docker container exec <container id> osmosisd tx gamm swap-exact-amount-in <tokeinInCoin> <tokenOutMinAmountInt> --swap-route-pool-ids <swapRoutePoolIds> --swap-route-denoms <swapRouteDenoms> --chain-id=<id>--from=<address> --keyring-backend=test -b=block --yes --log_format=json
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) error
WaitUntil waits until node reaches doneCondition. Return nil if reached, error otherwise.
func (*NodeConfig) WithSetupTime ¶
func (n *NodeConfig) WithSetupTime(t time.Time) *NodeConfig