Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BE-661 | Fix: claimbot panics #597

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

Unreleased

- Fixed claimbot panics due nil routerrepo.RouterRepository in txGasCalulator

## v27.2.0

- #593 - Add denoms filter for /pools endpoint
Expand Down
1 change: 1 addition & 0 deletions app/sidecar_query_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ func NewSideCarQueryServer(appCodec codec.Codec, config domain.Config, logger lo
keyring,
orderBookUseCase,
poolsUseCase,
gasCalculator,
logger,
config.ChainGRPCGatewayEndpoint,
config.ChainID,
Expand Down
3 changes: 2 additions & 1 deletion ingest/usecase/plugins/orderbook/claimbot/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewConfig(
keyring keyring.Keyring,
orderbookusecase mvc.OrderBookUsecase,
poolsUseCase mvc.PoolsUsecase,
msgSimulator sqstx.MsgSimulator,
logger log.Logger,
chainGRPCGatewayEndpoint string,
chainID string,
Expand All @@ -45,7 +46,7 @@ func NewConfig(
PoolsUseCase: poolsUseCase,
OrderbookUsecase: orderbookusecase,
AccountQueryClient: authtypes.NewQueryClient(grpcClient),
MsgSimulator: sqstx.NewMsgSimulator(grpcClient, sqstx.CalculateGas, nil),
MsgSimulator: msgSimulator,
TxServiceClient: txtypes.NewServiceClient(grpcClient),
Logger: logger.Named("claimbot"),
ChainID: chainID,
Expand Down
4 changes: 3 additions & 1 deletion ingest/usecase/plugins/orderbook/claimbot/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"sync/atomic"

"github.com/osmosis-labs/sqs/domain"
"github.com/osmosis-labs/sqs/domain/cosmos/tx"
"github.com/osmosis-labs/sqs/domain/keyring"
"github.com/osmosis-labs/sqs/domain/mvc"
orderbookdomain "github.com/osmosis-labs/sqs/domain/orderbook"
Expand Down Expand Up @@ -47,11 +48,12 @@ func New(
keyring keyring.Keyring,
orderbookusecase mvc.OrderBookUsecase,
poolsUsecase mvc.PoolsUsecase,
msgSimulator tx.MsgSimulator,
logger log.Logger,
chainGRPCGatewayEndpoint string,
chainID string,
) (*claimbot, error) {
config, err := NewConfig(keyring, orderbookusecase, poolsUsecase, logger, chainGRPCGatewayEndpoint, chainID)
config, err := NewConfig(keyring, orderbookusecase, poolsUsecase, msgSimulator, logger, chainGRPCGatewayEndpoint, chainID)
if err != nil {
return nil, fmt.Errorf("failed to create config: %w", err)
}
Expand Down
Loading