mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 00:05:18 +00:00
d45fa58f5c
* wip: add swap state persistent to genesis * separate pool record constructors; add tests for json and yaml encoding of record structs * beef up validation checks for state records * fix integration with master - renamed method * add test coverage for basic state array validations * extra test around pool record reserve and id ordering to ensure no regressions in the future * add validations to ensure pool records and share records are unique within the collection types * test genesis json and yaml encoding * validate in genesis that the total shares owned for each pool is equal to the total shares of each pool * update alias * nit lint * test genesis init and export * add migration todo Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
119 lines
5.5 KiB
Go
119 lines
5.5 KiB
Go
// Code generated by aliasgen tool (github.com/rhuairahrighairidh/aliasgen) DO NOT EDIT.
|
|
|
|
package swap
|
|
|
|
import (
|
|
"github.com/kava-labs/kava/x/swap/keeper"
|
|
"github.com/kava-labs/kava/x/swap/types"
|
|
)
|
|
|
|
const (
|
|
AttributeKeyDepositor = types.AttributeKeyDepositor
|
|
AttributeKeyExactDirection = types.AttributeKeyExactDirection
|
|
AttributeKeyFeePaid = types.AttributeKeyFeePaid
|
|
AttributeKeyOwner = types.AttributeKeyOwner
|
|
AttributeKeyPoolID = types.AttributeKeyPoolID
|
|
AttributeKeyRequester = types.AttributeKeyRequester
|
|
AttributeKeyShares = types.AttributeKeyShares
|
|
AttributeKeySwapInput = types.AttributeKeySwapInput
|
|
AttributeKeySwapOutput = types.AttributeKeySwapOutput
|
|
AttributeValueCategory = types.AttributeValueCategory
|
|
DefaultParamspace = types.DefaultParamspace
|
|
EventTypeSwapDeposit = types.EventTypeSwapDeposit
|
|
EventTypeSwapTrade = types.EventTypeSwapTrade
|
|
EventTypeSwapWithdraw = types.EventTypeSwapWithdraw
|
|
ModuleAccountName = types.ModuleAccountName
|
|
ModuleName = types.ModuleName
|
|
QuerierRoute = types.QuerierRoute
|
|
QueryGetDeposits = types.QueryGetDeposits
|
|
QueryGetParams = types.QueryGetParams
|
|
QueryGetPool = types.QueryGetPool
|
|
QueryGetPools = types.QueryGetPools
|
|
RouterKey = types.RouterKey
|
|
StoreKey = types.StoreKey
|
|
)
|
|
|
|
var (
|
|
// function aliases
|
|
NewKeeper = keeper.NewKeeper
|
|
NewQuerier = keeper.NewQuerier
|
|
DefaultGenesisState = types.DefaultGenesisState
|
|
DefaultParams = types.DefaultParams
|
|
DepositorPoolSharesKey = types.DepositorPoolSharesKey
|
|
NewAllowedPool = types.NewAllowedPool
|
|
NewAllowedPools = types.NewAllowedPools
|
|
NewBasePool = types.NewBasePool
|
|
NewBasePoolWithExistingShares = types.NewBasePoolWithExistingShares
|
|
NewDenominatedPool = types.NewDenominatedPool
|
|
NewDenominatedPoolWithExistingShares = types.NewDenominatedPoolWithExistingShares
|
|
NewDepositsQueryResult = types.NewDepositsQueryResult
|
|
NewGenesisState = types.NewGenesisState
|
|
NewMsgDeposit = types.NewMsgDeposit
|
|
NewMsgSwapExactForTokens = types.NewMsgSwapExactForTokens
|
|
NewMsgSwapForExactTokens = types.NewMsgSwapForExactTokens
|
|
NewMsgWithdraw = types.NewMsgWithdraw
|
|
NewParams = types.NewParams
|
|
NewPoolRecord = types.NewPoolRecord
|
|
NewPoolRecordFromPool = types.NewPoolRecordFromPool
|
|
NewPoolStatsQueryResult = types.NewPoolStatsQueryResult
|
|
NewQueryDepositsParams = types.NewQueryDepositsParams
|
|
NewQueryPoolParams = types.NewQueryPoolParams
|
|
NewShareRecord = types.NewShareRecord
|
|
ParamKeyTable = types.ParamKeyTable
|
|
PoolID = types.PoolID
|
|
PoolIDFromCoins = types.PoolIDFromCoins
|
|
PoolKey = types.PoolKey
|
|
RegisterCodec = types.RegisterCodec
|
|
|
|
// variable aliases
|
|
DefaultAllowedPools = types.DefaultAllowedPools
|
|
DefaultPoolRecords = types.DefaultPoolRecords
|
|
DefaultShareRecords = types.DefaultShareRecords
|
|
DefaultSwapFee = types.DefaultSwapFee
|
|
DepositorPoolSharesPrefix = types.DepositorPoolSharesPrefix
|
|
ErrDeadlineExceeded = types.ErrDeadlineExceeded
|
|
ErrDepositNotFound = types.ErrDepositNotFound
|
|
ErrInsufficientLiquidity = types.ErrInsufficientLiquidity
|
|
ErrInvalidCoin = types.ErrInvalidCoin
|
|
ErrInvalidDeadline = types.ErrInvalidDeadline
|
|
ErrInvalidPool = types.ErrInvalidPool
|
|
ErrInvalidShares = types.ErrInvalidShares
|
|
ErrInvalidSlippage = types.ErrInvalidSlippage
|
|
ErrNotAllowed = types.ErrNotAllowed
|
|
ErrNotImplemented = types.ErrNotImplemented
|
|
ErrSlippageExceeded = types.ErrSlippageExceeded
|
|
KeyAllowedPools = types.KeyAllowedPools
|
|
KeySwapFee = types.KeySwapFee
|
|
MaxSwapFee = types.MaxSwapFee
|
|
ModuleCdc = types.ModuleCdc
|
|
PoolKeyPrefix = types.PoolKeyPrefix
|
|
)
|
|
|
|
type (
|
|
Keeper = keeper.Keeper
|
|
AccountKeeper = types.AccountKeeper
|
|
AllowedPool = types.AllowedPool
|
|
AllowedPools = types.AllowedPools
|
|
BasePool = types.BasePool
|
|
DenominatedPool = types.DenominatedPool
|
|
DepositsQueryResult = types.DepositsQueryResult
|
|
DepositsQueryResults = types.DepositsQueryResults
|
|
GenesisState = types.GenesisState
|
|
MsgDeposit = types.MsgDeposit
|
|
MsgSwapExactForTokens = types.MsgSwapExactForTokens
|
|
MsgSwapForExactTokens = types.MsgSwapForExactTokens
|
|
MsgWithDeadline = types.MsgWithDeadline
|
|
MsgWithdraw = types.MsgWithdraw
|
|
Params = types.Params
|
|
PoolRecord = types.PoolRecord
|
|
PoolRecords = types.PoolRecords
|
|
PoolStatsQueryResult = types.PoolStatsQueryResult
|
|
PoolStatsQueryResults = types.PoolStatsQueryResults
|
|
QueryDepositsParams = types.QueryDepositsParams
|
|
QueryPoolParams = types.QueryPoolParams
|
|
ShareRecord = types.ShareRecord
|
|
ShareRecords = types.ShareRecords
|
|
SupplyKeeper = types.SupplyKeeper
|
|
SwapHooks = types.SwapHooks
|
|
)
|