testutil

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStandardMoneyMarket

func NewStandardMoneyMarket(denom string) types2.MoneyMarket

Types

type IncentiveGenesisBuilder

type IncentiveGenesisBuilder struct {
	types3.GenesisState
	// contains filtered or unexported fields
}

IncentiveGenesisBuilder is a tool for creating an incentive genesis state. Helper methods add values onto a default genesis state. All methods are immutable and return updated copies of the builder.

func NewIncentiveGenesisBuilder

func NewIncentiveGenesisBuilder() IncentiveGenesisBuilder

func (IncentiveGenesisBuilder) Build

func (IncentiveGenesisBuilder) BuildMarshalled

func (builder IncentiveGenesisBuilder) BuildMarshalled(cdc codec.JSONCodec) app.GenesisState

func (IncentiveGenesisBuilder) WithGenesisTime

func (builder IncentiveGenesisBuilder) WithGenesisTime(time time.Time) IncentiveGenesisBuilder

func (IncentiveGenesisBuilder) WithInitializedBorrowRewardPeriod

func (builder IncentiveGenesisBuilder) WithInitializedBorrowRewardPeriod(period types3.MultiRewardPeriod) IncentiveGenesisBuilder

WithInitializedBorrowRewardPeriod sets the genesis time as the previous accumulation time for the specified period. This can be helpful in tests. With no prev time set, the first block accrues no rewards as it just sets the prev time to the current.

func (IncentiveGenesisBuilder) WithInitializedSupplyRewardPeriod

func (builder IncentiveGenesisBuilder) WithInitializedSupplyRewardPeriod(period types3.MultiRewardPeriod) IncentiveGenesisBuilder

WithInitializedSupplyRewardPeriod sets the genesis time as the previous accumulation time for the specified period. This can be helpful in tests. With no prev time set, the first block accrues no rewards as it just sets the prev time to the current.

func (IncentiveGenesisBuilder) WithMultipliers

func (builder IncentiveGenesisBuilder) WithMultipliers(multipliers types3.MultipliersPerDenoms) IncentiveGenesisBuilder

func (IncentiveGenesisBuilder) WithSimpleBorrowRewardPeriod

func (builder IncentiveGenesisBuilder) WithSimpleBorrowRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder

func (IncentiveGenesisBuilder) WithSimpleSupplyRewardPeriod

func (builder IncentiveGenesisBuilder) WithSimpleSupplyRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder

type IntegrationTester

type IntegrationTester struct {
	suite.Suite
	App app.TestApp
	Ctx sdk.Context
}

func (*IntegrationTester) BalanceEquals

func (suite *IntegrationTester) BalanceEquals(address sdk.AccAddress, expected sdk.Coins)

func (*IntegrationTester) BalanceInEpsilon

func (suite *IntegrationTester) BalanceInEpsilon(address sdk.AccAddress, expected sdk.Coins, epsilon float64)

func (*IntegrationTester) DeliverHardMsgRepay

func (suite *IntegrationTester) DeliverHardMsgRepay(owner sdk.AccAddress, repay sdk.Coins) error

func (*IntegrationTester) DeliverIncentiveMsg

func (suite *IntegrationTester) DeliverIncentiveMsg(msg sdk.Msg) error

func (*IntegrationTester) DeliverJoltMsgBorrow

func (suite *IntegrationTester) DeliverJoltMsgBorrow(owner sdk.AccAddress, borrow sdk.Coins) error

func (*IntegrationTester) DeliverJoltMsgDeposit

func (suite *IntegrationTester) DeliverJoltMsgDeposit(owner sdk.AccAddress, deposit sdk.Coins) error

func (*IntegrationTester) DeliverJoltMsgWithdraw

func (suite *IntegrationTester) DeliverJoltMsgWithdraw(owner sdk.AccAddress, withdraw sdk.Coins) error

func (*IntegrationTester) DeliverMsgCreateValidator

func (suite *IntegrationTester) DeliverMsgCreateValidator(address sdk.ValAddress, selfDelegation sdk.Coin) error

func (*IntegrationTester) DeliverMsgDelegate

func (suite *IntegrationTester) DeliverMsgDelegate(delegator sdk.AccAddress, validator sdk.ValAddress, amount sdk.Coin) error

func (*IntegrationTester) ErrorIs

func (suite *IntegrationTester) ErrorIs(err, target error) bool

func (*IntegrationTester) GetAccount

func (suite *IntegrationTester) GetAccount(addr sdk.AccAddress) authtypes.AccountI

func (*IntegrationTester) GetBalance

func (suite *IntegrationTester) GetBalance(address sdk.AccAddress) sdk.Coins

func (*IntegrationTester) GetModuleAccount

func (suite *IntegrationTester) GetModuleAccount(name string) authtypes.ModuleAccountI

func (*IntegrationTester) JoltRewardEquals

func (suite *IntegrationTester) JoltRewardEquals(owner sdk.AccAddress, expected sdk.Coins)

func (*IntegrationTester) NextBlockAfter

func (suite *IntegrationTester) NextBlockAfter(blockDuration time.Duration)

func (*IntegrationTester) NextBlockAt

func (suite *IntegrationTester) NextBlockAt(blockTime time.Time)

func (*IntegrationTester) SetApp

func (suite *IntegrationTester) SetApp()

func (*IntegrationTester) SetupSuite

func (suite *IntegrationTester) SetupSuite()

func (*IntegrationTester) StartChain

func (suite *IntegrationTester) StartChain(genAccs []authtypes.GenesisAccount, coins sdk.Coins, genesisTime time.Time, genesisStates ...app.GenesisState)

func (*IntegrationTester) VestingPeriodsEqual

func (suite *IntegrationTester) VestingPeriodsEqual(address sdk.AccAddress, expectedPeriods []vestingtypes.Period)

type JoltGenesisBuilder

type JoltGenesisBuilder struct {
	types2.GenesisState
	// contains filtered or unexported fields
}

JoltGenesisBuilder is a tool for creating a jolt genesis state. Helper methods add values onto a default genesis state. All methods are immutable and return updated copies of the builder.

func NewJoltGenesisBuilder

func NewJoltGenesisBuilder() JoltGenesisBuilder

func (JoltGenesisBuilder) Build

func (builder JoltGenesisBuilder) Build() types2.GenesisState

func (JoltGenesisBuilder) BuildMarshalled

func (builder JoltGenesisBuilder) BuildMarshalled(cdc codec.JSONCodec) app.GenesisState

func (JoltGenesisBuilder) WithGenesisTime

func (builder JoltGenesisBuilder) WithGenesisTime(genTime time.Time) JoltGenesisBuilder

func (JoltGenesisBuilder) WithInitializedMoneyMarket

func (builder JoltGenesisBuilder) WithInitializedMoneyMarket(market types2.MoneyMarket) JoltGenesisBuilder

func (JoltGenesisBuilder) WithMinBorrow

func (builder JoltGenesisBuilder) WithMinBorrow(minUSDValue sdk.Dec) JoltGenesisBuilder

Jump to

Keyboard shortcuts

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