Skip to content

Commit

Permalink
Merge branch 'main' into feat/removal-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
aljo242 committed Sep 23, 2024
2 parents 68414d8 + 9e81c12 commit bc9c93c
Show file tree
Hide file tree
Showing 11 changed files with 142 additions and 156 deletions.
113 changes: 57 additions & 56 deletions abci/strategies/currencypair/mocks/mock_oracle_keeper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions abci/strategies/currencypair/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package currencypair

import (
"context"
"math/big"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -13,12 +14,12 @@ import (
//
//go:generate mockery --name OracleKeeper --filename mock_oracle_keeper.go
type OracleKeeper interface {
GetCurrencyPairFromID(ctx sdk.Context, id uint64) (cp connecttypes.CurrencyPair, found bool)
GetIDForCurrencyPair(ctx sdk.Context, cp connecttypes.CurrencyPair) (uint64, bool)
GetPriceForCurrencyPair(ctx sdk.Context, cp connecttypes.CurrencyPair) (oracletypes.QuotePrice, error)
GetNumCurrencyPairs(ctx sdk.Context) (uint64, error)
GetNumRemovedCurrencyPairs(ctx sdk.Context) (uint64, error)
GetAllCurrencyPairs(ctx sdk.Context) []connecttypes.CurrencyPair
GetCurrencyPairFromID(ctx context.Context, id uint64) (cp connecttypes.CurrencyPair, found bool)
GetIDForCurrencyPair(ctx context.Context, cp connecttypes.CurrencyPair) (uint64, bool)
GetPriceForCurrencyPair(ctx context.Context, cp connecttypes.CurrencyPair) (oracletypes.QuotePrice, error)
GetNumCurrencyPairs(ctx context.Context) (uint64, error)
GetNumRemovedCurrencyPairs(ctx context.Context) (uint64, error)
GetAllCurrencyPairs(ctx context.Context) []connecttypes.CurrencyPair
}

// CurrencyPairStrategy is a strategy for generating a unique ID and price representation for a given currency pair.
Expand Down
5 changes: 2 additions & 3 deletions abci/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package types
import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc"

connecttypes "github.com/skip-mev/connect/v2/pkg/types"
Expand All @@ -17,8 +16,8 @@ import (
//
//go:generate mockery --name OracleKeeper --filename mock_oracle_keeper.go
type OracleKeeper interface { //golint:ignore
GetAllCurrencyPairs(ctx sdk.Context) []connecttypes.CurrencyPair
SetPriceForCurrencyPair(ctx sdk.Context, cp connecttypes.CurrencyPair, qp oracletypes.QuotePrice) error
GetAllCurrencyPairs(ctx context.Context) []connecttypes.CurrencyPair
SetPriceForCurrencyPair(ctx context.Context, cp connecttypes.CurrencyPair, qp oracletypes.QuotePrice) error
}

// OracleClient defines the interface that must be fulfilled by the connect client.
Expand Down
Loading

0 comments on commit bc9c93c

Please sign in to comment.