Documentation ¶
Index ¶
- Variables
- func CreateRandomAccounts(numAccts int) []sdk.AccAddress
- type KeeperTestHelper
- func (s *KeeperTestHelper) AllocateRewardsToValidator(valAddr sdk.ValAddress, rewardAmt sdk.Int)
- func (s *KeeperTestHelper) BeginNewBlock(executeNextEpoch bool)
- func (s *KeeperTestHelper) BeginNewBlockWithProposer(executeNextEpoch bool, proposer sdk.ValAddress)
- func (s *KeeperTestHelper) BuildTx(txBuilder client.TxBuilder, msgs []sdk.Msg, sigV2 signing.SignatureV2, ...) authsigning.Tx
- func (s *KeeperTestHelper) EndBlock()
- func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins)
- func (s *KeeperTestHelper) LockTokens(addr sdk.AccAddress, coins sdk.Coins, duration time.Duration) (lockID uint64)
- func (suite *KeeperTestHelper) PrepareBalancerPool() uint64
- func (suite *KeeperTestHelper) PrepareBalancerPoolWithPoolAsset(assets []balancer.PoolAsset) uint64
- func (suite *KeeperTestHelper) PrepareBalancerPoolWithPoolParams(poolParams balancer.PoolParams) uint64
- func (suite *KeeperTestHelper) PrepareUni2PoolWithAssets(asset1, asset2 sdk.Coin) uint64
- func (s *KeeperTestHelper) Setup()
- func (s *KeeperTestHelper) SetupGammPoolsWithBondDenomMultiplier(multipliers []sdk.Dec) []gammtypes.PoolI
- func (s *KeeperTestHelper) SetupTokenFactory()
- func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sdk.ValAddress
- func (s *KeeperTestHelper) SwapAndSetSpotPrice(poolId uint64, fromAsset sdk.Coin, toAsset sdk.Coin) sdk.Dec
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateRandomAccounts ¶
func CreateRandomAccounts(numAccts int) []sdk.AccAddress
CreateRandomAccounts is a function return a list of randomly generated AccAddresses
Types ¶
type KeeperTestHelper ¶
type KeeperTestHelper struct { suite.Suite App *app.OsmosisApp Ctx sdk.Context QueryHelper *baseapp.QueryServiceTestHelper TestAccs []sdk.AccAddress }
func (*KeeperTestHelper) AllocateRewardsToValidator ¶
func (s *KeeperTestHelper) AllocateRewardsToValidator(valAddr sdk.ValAddress, rewardAmt sdk.Int)
func (*KeeperTestHelper) BeginNewBlock ¶
func (s *KeeperTestHelper) BeginNewBlock(executeNextEpoch bool)
func (*KeeperTestHelper) BeginNewBlockWithProposer ¶
func (s *KeeperTestHelper) BeginNewBlockWithProposer(executeNextEpoch bool, proposer sdk.ValAddress)
func (*KeeperTestHelper) BuildTx ¶
func (s *KeeperTestHelper) BuildTx( txBuilder client.TxBuilder, msgs []sdk.Msg, sigV2 signing.SignatureV2, memo string, txFee sdk.Coins, gasLimit uint64, ) authsigning.Tx
func (*KeeperTestHelper) EndBlock ¶
func (s *KeeperTestHelper) EndBlock()
func (*KeeperTestHelper) FundAcc ¶
func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins)
func (*KeeperTestHelper) LockTokens ¶
func (s *KeeperTestHelper) LockTokens(addr sdk.AccAddress, coins sdk.Coins, duration time.Duration) (lockID uint64)
func (*KeeperTestHelper) PrepareBalancerPool ¶
func (suite *KeeperTestHelper) PrepareBalancerPool() uint64
func (*KeeperTestHelper) PrepareBalancerPoolWithPoolAsset ¶
func (suite *KeeperTestHelper) PrepareBalancerPoolWithPoolAsset(assets []balancer.PoolAsset) uint64
func (*KeeperTestHelper) PrepareBalancerPoolWithPoolParams ¶
func (suite *KeeperTestHelper) PrepareBalancerPoolWithPoolParams(poolParams balancer.PoolParams) uint64
func (*KeeperTestHelper) PrepareUni2PoolWithAssets ¶
func (suite *KeeperTestHelper) PrepareUni2PoolWithAssets(asset1, asset2 sdk.Coin) uint64
Returns a Univ2 pool with the initial liquidity being the provided balances
func (*KeeperTestHelper) Setup ¶
func (s *KeeperTestHelper) Setup()
func (*KeeperTestHelper) SetupGammPoolsWithBondDenomMultiplier ¶
func (s *KeeperTestHelper) SetupGammPoolsWithBondDenomMultiplier(multipliers []sdk.Dec) []gammtypes.PoolI
SetupGammPoolsWithBondDenomMultiplier uses given multipliers to set initial pool supply of bond denom.
func (*KeeperTestHelper) SetupTokenFactory ¶
func (s *KeeperTestHelper) SetupTokenFactory()
func (*KeeperTestHelper) SetupValidator ¶
func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sdk.ValAddress
func (*KeeperTestHelper) SwapAndSetSpotPrice ¶
func (s *KeeperTestHelper) SwapAndSetSpotPrice(poolId uint64, fromAsset sdk.Coin, toAsset sdk.Coin) sdk.Dec
SwapAndSetSpotPrice runs a swap to set Spot price of a pool using arbitrary values returns spot price after the arbitrary swap.
Click to show internal directories.
Click to hide internal directories.