testutil

package
v0.16.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecMsgCreatePool

func ExecMsgCreatePool(
	t *testing.T,
	clientCtx client.Context,
	owner fmt.Stringer,
	tokenWeights string,
	initialDeposit string,
	swapFee string,
	exitFee string,
	extraArgs ...string,
) (testutil.BufferWriter, error)

ExecMsgCreatePool broadcast a pool creation message.

func ExecMsgExitPool added in v0.1.0

func ExecMsgExitPool(
	clientCtx client.Context,
	poolId uint64,
	sender fmt.Stringer,
	poolSharesOut string,
	extraArgs ...string,
) (testutil.BufferWriter, error)

ExecMsgExitPool broadcast an exit pool message.

func ExecMsgJoinPool added in v0.1.0

func ExecMsgJoinPool(
	clientCtx client.Context,
	poolId uint64,
	sender fmt.Stringer,
	tokensIn string,
	useAllCoins string,
	extraArgs ...string,
) (testutil.BufferWriter, error)

ExecMsgJoinPool broadcast a join pool message.

func ExecMsgSwapAssets added in v0.1.0

func ExecMsgSwapAssets(
	clientCtx client.Context,
	poolId uint64,
	sender fmt.Stringer,
	tokenIn string,
	tokenOutDenom string,
	extraArgs ...string,
) (testutil.BufferWriter, error)

ExecMsgSwapAssets broadcast a swap assets message.

func ExtractPoolIDFromCreatePoolResponse added in v0.15.0

func ExtractPoolIDFromCreatePoolResponse(codec codec.Codec, out testutil.BufferWriter) (uint64, error)

ExtractPoolIDFromCreatePoolResponse extracts the created PoolID from a MsgCreatePool command.

func WhitelistGenesisAssets added in v0.15.0

func WhitelistGenesisAssets(state simapp.GenesisState, assets []string) simapp.GenesisState

WhitelistGenesisAssets given a simapp.GenesisState includes the whitelisted assets into Dex Whitelisted assets.

Types

type IntegrationTestSuite added in v0.15.0

type IntegrationTestSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func NewIntegrationTestSuite added in v0.15.0

func NewIntegrationTestSuite(cfg testutilcli.Config) *IntegrationTestSuite

func (*IntegrationTestSuite) FundAccount added in v0.15.0

func (s *IntegrationTestSuite) FundAccount(recipient sdk.Address, tokens sdk.Coins)

Adds tokens from val[0] to a recipient address.

args:

  • recipient: the recipient address
  • tokens: the amount of tokens to transfer

func (*IntegrationTestSuite) NewAccount added in v0.15.0

func (s *IntegrationTestSuite) NewAccount(uid string) (addr sdk.AccAddress)

Creates a new account and returns the address.

args:

  • uid: a unique identifier to ensure duplicate accounts are not created

ret:

  • addr: the address of the new account

func (*IntegrationTestSuite) SetupSuite added in v0.15.0

func (s *IntegrationTestSuite) SetupSuite()

func (*IntegrationTestSuite) TearDownSuite added in v0.15.0

func (s *IntegrationTestSuite) TearDownSuite()

func (*IntegrationTestSuite) TestCreatePoolCmd added in v0.15.0

func (s *IntegrationTestSuite) TestCreatePoolCmd()

func (*IntegrationTestSuite) TestCreatePoolCmd_Errors added in v0.15.0

func (s *IntegrationTestSuite) TestCreatePoolCmd_Errors()

func (*IntegrationTestSuite) TestGetCmdTotalLiquidity added in v0.15.0

func (s *IntegrationTestSuite) TestGetCmdTotalLiquidity()

func (*IntegrationTestSuite) TestNewExitPoolCmd added in v0.15.0

func (s *IntegrationTestSuite) TestNewExitPoolCmd()

func (*IntegrationTestSuite) TestNewJoinPoolCmd added in v0.15.0

func (s *IntegrationTestSuite) TestNewJoinPoolCmd()

func (*IntegrationTestSuite) TestSwapAssets added in v0.15.0

func (s *IntegrationTestSuite) TestSwapAssets()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL