Documentation ¶
Index ¶
- func NewStandardMoneyMarket(denom string) hardtypes.MoneyMarket
- type HardGenesisBuilder
- func (builder HardGenesisBuilder) Build() hardtypes.GenesisState
- func (builder HardGenesisBuilder) BuildMarshalled(cdc codec.JSONCodec) app.GenesisState
- func (builder HardGenesisBuilder) WithGenesisTime(genTime time.Time) HardGenesisBuilder
- func (builder HardGenesisBuilder) WithInitializedMoneyMarket(market hardtypes.MoneyMarket) HardGenesisBuilder
- func (builder HardGenesisBuilder) WithMinBorrow(minUSDValue sdk.Dec) HardGenesisBuilder
- type IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) Build() types.GenesisState
- func (builder IncentiveGenesisBuilder) BuildMarshalled(cdc codec.JSONCodec) app.GenesisState
- func (builder IncentiveGenesisBuilder) WithGenesisTime(time time.Time) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithInitializedBorrowRewardPeriod(period types.MultiRewardPeriod) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithInitializedDelegatorRewardPeriod(period types.MultiRewardPeriod) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithInitializedSupplyRewardPeriod(period types.MultiRewardPeriod) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithInitializedSwapRewardPeriod(period types.MultiRewardPeriod) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithInitializedUSDXRewardPeriod(period types.RewardPeriod) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithMultipliers(multipliers types.MultipliersPerDenoms) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithSimpleBorrowRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithSimpleDelegatorRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithSimpleSupplyRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithSimpleSwapRewardPeriod(poolID string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
- func (builder IncentiveGenesisBuilder) WithSimpleUSDXRewardPeriod(ctype string, rewardsPerSecond sdk.Coin) IncentiveGenesisBuilder
- type IntegrationTester
- func (suite *IntegrationTester) BalanceEquals(address sdk.AccAddress, expected sdk.Coins)
- func (suite *IntegrationTester) BalanceInEpsilon(address sdk.AccAddress, expected sdk.Coins, epsilon float64)
- func (suite *IntegrationTester) DelegatorRewardEquals(owner sdk.AccAddress, expected sdk.Coins)
- func (suite *IntegrationTester) DeliverCDPMsgBorrow(owner sdk.AccAddress, collateralType string, draw sdk.Coin) error
- func (suite *IntegrationTester) DeliverCDPMsgRepay(owner sdk.AccAddress, collateralType string, payment sdk.Coin) error
- func (suite *IntegrationTester) DeliverHardMsgBorrow(owner sdk.AccAddress, borrow sdk.Coins) error
- func (suite *IntegrationTester) DeliverHardMsgDeposit(owner sdk.AccAddress, deposit sdk.Coins) error
- func (suite *IntegrationTester) DeliverHardMsgRepay(owner sdk.AccAddress, repay sdk.Coins) error
- func (suite *IntegrationTester) DeliverHardMsgWithdraw(owner sdk.AccAddress, withdraw sdk.Coins) error
- func (suite *IntegrationTester) DeliverIncentiveMsg(msg sdk.Msg) error
- func (suite *IntegrationTester) DeliverMsgCreateCDP(owner sdk.AccAddress, collateral, principal sdk.Coin, collateralType string) error
- func (suite *IntegrationTester) DeliverMsgCreateValidator(address sdk.ValAddress, selfDelegation sdk.Coin) error
- func (suite *IntegrationTester) DeliverMsgDelegate(delegator sdk.AccAddress, validator sdk.ValAddress, amount sdk.Coin) error
- func (suite *IntegrationTester) DeliverSwapMsgDeposit(depositor sdk.AccAddress, tokenA, tokenB sdk.Coin, slippage sdk.Dec) error
- func (suite *IntegrationTester) ErrorIs(err, target error) bool
- func (suite *IntegrationTester) GetAccount(addr sdk.AccAddress) authtypes.AccountI
- func (suite *IntegrationTester) GetBalance(address sdk.AccAddress) sdk.Coins
- func (suite *IntegrationTester) GetModuleAccount(name string) authtypes.ModuleAccountI
- func (suite *IntegrationTester) HardRewardEquals(owner sdk.AccAddress, expected sdk.Coins)
- func (suite *IntegrationTester) NextBlockAfter(blockDuration time.Duration)
- func (suite *IntegrationTester) NextBlockAt(blockTime time.Time)
- func (suite *IntegrationTester) ProposeAndVoteOnNewParams(voter sdk.AccAddress, committeeID uint64, changes []proposaltypes.ParamChange)
- func (suite *IntegrationTester) SetApp()
- func (suite *IntegrationTester) SetupSuite()
- func (suite *IntegrationTester) StartChain(genesisTime time.Time, genesisStates ...app.GenesisState)
- func (suite *IntegrationTester) SwapRewardEquals(owner sdk.AccAddress, expected sdk.Coins)
- func (suite *IntegrationTester) USDXRewardEquals(owner sdk.AccAddress, expected sdk.Coin)
- func (suite *IntegrationTester) VestingPeriodsEqual(address sdk.AccAddress, expectedPeriods []vestingtypes.Period)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStandardMoneyMarket ¶
func NewStandardMoneyMarket(denom string) hardtypes.MoneyMarket
Types ¶
type HardGenesisBuilder ¶
type HardGenesisBuilder struct { hardtypes.GenesisState // contains filtered or unexported fields }
HardGenesisBuilder is a tool for creating a hard genesis state. Helper methods add values onto a default genesis state. All methods are immutable and return updated copies of the builder.
func NewHardGenesisBuilder ¶
func NewHardGenesisBuilder() HardGenesisBuilder
func (HardGenesisBuilder) Build ¶
func (builder HardGenesisBuilder) Build() hardtypes.GenesisState
func (HardGenesisBuilder) BuildMarshalled ¶
func (builder HardGenesisBuilder) BuildMarshalled(cdc codec.JSONCodec) app.GenesisState
func (HardGenesisBuilder) WithGenesisTime ¶
func (builder HardGenesisBuilder) WithGenesisTime(genTime time.Time) HardGenesisBuilder
func (HardGenesisBuilder) WithInitializedMoneyMarket ¶
func (builder HardGenesisBuilder) WithInitializedMoneyMarket(market hardtypes.MoneyMarket) HardGenesisBuilder
func (HardGenesisBuilder) WithMinBorrow ¶
func (builder HardGenesisBuilder) WithMinBorrow(minUSDValue sdk.Dec) HardGenesisBuilder
type IncentiveGenesisBuilder ¶
type IncentiveGenesisBuilder struct { types.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 (builder IncentiveGenesisBuilder) Build() types.GenesisState
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 types.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) WithInitializedDelegatorRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithInitializedDelegatorRewardPeriod(period types.MultiRewardPeriod) IncentiveGenesisBuilder
WithInitializedDelegatorRewardPeriod 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 types.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) WithInitializedSwapRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithInitializedSwapRewardPeriod(period types.MultiRewardPeriod) IncentiveGenesisBuilder
WithInitializedSwapRewardPeriod 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) WithInitializedUSDXRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithInitializedUSDXRewardPeriod(period types.RewardPeriod) IncentiveGenesisBuilder
WithInitializedUSDXRewardPeriod 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 types.MultipliersPerDenoms) IncentiveGenesisBuilder
func (IncentiveGenesisBuilder) WithSimpleBorrowRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithSimpleBorrowRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
func (IncentiveGenesisBuilder) WithSimpleDelegatorRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithSimpleDelegatorRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
func (IncentiveGenesisBuilder) WithSimpleSupplyRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithSimpleSupplyRewardPeriod(ctype string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
func (IncentiveGenesisBuilder) WithSimpleSwapRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithSimpleSwapRewardPeriod(poolID string, rewardsPerSecond sdk.Coins) IncentiveGenesisBuilder
func (IncentiveGenesisBuilder) WithSimpleUSDXRewardPeriod ¶
func (builder IncentiveGenesisBuilder) WithSimpleUSDXRewardPeriod(ctype string, rewardsPerSecond sdk.Coin) IncentiveGenesisBuilder
type IntegrationTester ¶
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) DelegatorRewardEquals ¶
func (suite *IntegrationTester) DelegatorRewardEquals(owner sdk.AccAddress, expected sdk.Coins)
func (*IntegrationTester) DeliverCDPMsgBorrow ¶
func (suite *IntegrationTester) DeliverCDPMsgBorrow(owner sdk.AccAddress, collateralType string, draw sdk.Coin) error
func (*IntegrationTester) DeliverCDPMsgRepay ¶
func (suite *IntegrationTester) DeliverCDPMsgRepay(owner sdk.AccAddress, collateralType string, payment sdk.Coin) error
func (*IntegrationTester) DeliverHardMsgBorrow ¶
func (suite *IntegrationTester) DeliverHardMsgBorrow(owner sdk.AccAddress, borrow sdk.Coins) error
func (*IntegrationTester) DeliverHardMsgDeposit ¶
func (suite *IntegrationTester) DeliverHardMsgDeposit(owner sdk.AccAddress, deposit sdk.Coins) error
func (*IntegrationTester) DeliverHardMsgRepay ¶
func (suite *IntegrationTester) DeliverHardMsgRepay(owner sdk.AccAddress, repay sdk.Coins) error
func (*IntegrationTester) DeliverHardMsgWithdraw ¶
func (suite *IntegrationTester) DeliverHardMsgWithdraw(owner sdk.AccAddress, withdraw sdk.Coins) error
func (*IntegrationTester) DeliverIncentiveMsg ¶
func (suite *IntegrationTester) DeliverIncentiveMsg(msg sdk.Msg) error
func (*IntegrationTester) DeliverMsgCreateCDP ¶
func (suite *IntegrationTester) DeliverMsgCreateCDP(owner sdk.AccAddress, collateral, principal sdk.Coin, collateralType string) 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) DeliverSwapMsgDeposit ¶
func (suite *IntegrationTester) DeliverSwapMsgDeposit(depositor sdk.AccAddress, tokenA, tokenB sdk.Coin, slippage sdk.Dec) 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) HardRewardEquals ¶
func (suite *IntegrationTester) HardRewardEquals(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) ProposeAndVoteOnNewParams ¶
func (suite *IntegrationTester) ProposeAndVoteOnNewParams(voter sdk.AccAddress, committeeID uint64, changes []proposaltypes.ParamChange)
func (*IntegrationTester) SetApp ¶ added in v0.16.0
func (suite *IntegrationTester) SetApp()
func (*IntegrationTester) SetupSuite ¶
func (suite *IntegrationTester) SetupSuite()
func (*IntegrationTester) StartChain ¶
func (suite *IntegrationTester) StartChain(genesisTime time.Time, genesisStates ...app.GenesisState)
func (*IntegrationTester) SwapRewardEquals ¶
func (suite *IntegrationTester) SwapRewardEquals(owner sdk.AccAddress, expected sdk.Coins)
func (*IntegrationTester) USDXRewardEquals ¶
func (suite *IntegrationTester) USDXRewardEquals(owner sdk.AccAddress, expected sdk.Coin)
func (*IntegrationTester) VestingPeriodsEqual ¶
func (suite *IntegrationTester) VestingPeriodsEqual(address sdk.AccAddress, expectedPeriods []vestingtypes.Period)