Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
p0mvn committed Nov 4, 2024
1 parent a933e0c commit 052139b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func NewEndBlockUpdatePlugin(routerRepository routerrepo.RouterRepository, txfee

// ProcessEndBlock calculates the base fee for the current block and updates the router repository with the new base fee.
func (p *baseFeeEndBlockUpdatePlugin) ProcessEndBlock(ctx context.Context, blockHeight uint64, metadata domain.BlockPoolMetadata) error {

baseFee, err := tx.CalculateFeePrice(ctx, p.txfeesClient)
if err != nil {
p.logger.Error("failed to calculate fee price", zap.Error(err))
Expand Down
2 changes: 1 addition & 1 deletion ingest/usecase/plugins/orderbook/claimbot/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func SendBatchClaimTxInternal(
claims orderbookdomain.Orders,
getEncodingConfig func() params.EncodingConfig,
) (*sdk.TxResponse, error) {
return sendBatchClaimTxInternal(ctx, keyring, txfeesClient, msgSimulator, txServiceClient, chainID, account, contractAddress, claims, getEncodingConfig)
return sendBatchClaimTxInternal(ctx, keyring, msgSimulator, txServiceClient, chainID, account, contractAddress, claims, getEncodingConfig)
}

// PrepareBatchClaimMsg is a test wrapper for prepareBatchClaimMsg.
Expand Down
1 change: 0 additions & 1 deletion ingest/usecase/plugins/orderbook/claimbot/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ func (o *claimbot) processOrderbookOrders(ctx context.Context, account *authtype
txres, err := sendBatchClaimTx(
ctx,
o.config.Keyring,
o.config.TxfeesClient,
o.config.MsgSimulator,
o.config.TxServiceClient,
o.config.ChainID,
Expand Down
5 changes: 1 addition & 4 deletions ingest/usecase/plugins/orderbook/claimbot/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/osmosis-labs/osmosis/v26/app"
"github.com/osmosis-labs/osmosis/v26/app/params"
txfeestypes "github.com/osmosis-labs/osmosis/v26/x/txfees/types"
)

var (
Expand All @@ -32,23 +31,21 @@ var (
func sendBatchClaimTx(
ctx context.Context,
keyring keyring.Keyring,
txfeesClient txfeestypes.QueryClient,
msgSimulator sqstx.MsgSimulator,
txServiceClient txtypes.ServiceClient,
chainID string,
account *authtypes.BaseAccount,
contractAddress string,
claims orderbookdomain.Orders,
) (*sdk.TxResponse, error) {
return sendBatchClaimTxInternal(ctx, keyring, txfeesClient, msgSimulator, txServiceClient, chainID, account, contractAddress, claims, defaultEncodingConfigFn)
return sendBatchClaimTxInternal(ctx, keyring, msgSimulator, txServiceClient, chainID, account, contractAddress, claims, defaultEncodingConfigFn)
}

// sendBatchClaimTxInternal is a helper function that prepares and sends a batch claim transaction to the blockchain.
// It takes an encoding config function as a parameter to allow for customization of the encoding config in tests.
func sendBatchClaimTxInternal(
ctx context.Context,
keyring keyring.Keyring,
txfeesClient txfeestypes.QueryClient,
msgSimulator sqstx.MsgSimulator,
txServiceClient txtypes.ServiceClient,
chainID string,
Expand Down

0 comments on commit 052139b

Please sign in to comment.