mocks

package
v0.0.0-...-8acb6f8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RefundAdminConfigKeyMRRA = `RefundAdminConfigKeyMRRA`
	RefundPoolKey            = `RefundPoolKey`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPoolStorage

type MockPoolStorage struct {
}

MockPoolStorage implements PoolStorage interface, thus we can mock the error cases

func (MockPoolStorage) AddIncompleteEvents

func (mps MockPoolStorage) AddIncompleteEvents(ctx sdk.Context, event types.Event)

func (MockPoolStorage) GetAdminConfigDefaultPoolStatus

func (mps MockPoolStorage) GetAdminConfigDefaultPoolStatus(ctx sdk.Context, addr sdk.AccAddress) types.PoolStatus

func (MockPoolStorage) GetAdminConfigStakerAmtInterval

func (mps MockPoolStorage) GetAdminConfigStakerAmtInterval(ctx sdk.Context, addr sdk.AccAddress) common.Amount

func (MockPoolStorage) GetAdminConfigValue

func (mps MockPoolStorage) GetAdminConfigValue(ctx sdk.Context, key types.AdminConfigKey, addr sdk.AccAddress) (string, error)

func (MockPoolStorage) GetLowestActiveVersion

func (mps MockPoolStorage) GetLowestActiveVersion(ctx sdk.Context) int64

func (MockPoolStorage) GetPool

func (mps MockPoolStorage) GetPool(ctx sdk.Context, asset common.Asset) types.Pool

func (MockPoolStorage) GetPoolStaker

func (mps MockPoolStorage) GetPoolStaker(ctx sdk.Context, asset common.Asset) (types.PoolStaker, error)

func (MockPoolStorage) GetStakerPool

func (mps MockPoolStorage) GetStakerPool(ctx sdk.Context, stakerID common.Address) (types.StakerPool, error)

func (MockPoolStorage) PoolExist

func (mps MockPoolStorage) PoolExist(ctx sdk.Context, asset common.Asset) bool

func (MockPoolStorage) SetCompletedEvent

func (mps MockPoolStorage) SetCompletedEvent(ctx sdk.Context, event types.Event)

func (MockPoolStorage) SetPool

func (mps MockPoolStorage) SetPool(ctx sdk.Context, ps types.Pool)

func (MockPoolStorage) SetPoolStaker

func (mps MockPoolStorage) SetPoolStaker(ctx sdk.Context, asset common.Asset, ps types.PoolStaker)

func (MockPoolStorage) SetStakerPool

func (mps MockPoolStorage) SetStakerPool(ctx sdk.Context, stakerID common.Address, sp types.StakerPool)

type MockRefundStoreAccessor

type MockRefundStoreAccessor struct {
}

MockRefundStoreAccessor implements PoolStorage interface, thus we can mock the error cases

func NewMockRefundStoreAccessor

func NewMockRefundStoreAccessor() *MockRefundStoreAccessor

func (MockRefundStoreAccessor) GetAdminConfigMRRA

func (mrsa MockRefundStoreAccessor) GetAdminConfigMRRA(ctx sdk.Context, addr sdk.AccAddress) sdk.Uint

func (MockRefundStoreAccessor) GetPool

func (mrsa MockRefundStoreAccessor) GetPool(ctx sdk.Context, ticker common.Ticker) types.Pool

GetPool return an instance of Pool

Jump to

Keyboard shortcuts

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