UNPKG

test-pkg-ngn

Version:

A library containing helper functions that facilitate scripting for keepers of the Keep3r Network

32 lines (31 loc) 2.58 kB
import { SendAndRetryUntilNotWorkableProps } from '@types'; /** * @notice Sends new bundles to different targetBlocks until the job is successfully worked, or another keeper works it. * * @dev If the last bundle was sent to block 100, 101, 102, and 100 was not included, a new bundle will be sent to blocks 103 + newBurstSize * if the job is still workable. * * @param txs The transactions to be retried if nothing is provided in the regenerateTxs parameter. * @param provider A provider. It will be used to fetch the block in which the first bundles of our batches were not included. * @param priorityFee The priority fee to be paid to the miner. * @param bundles The batches of bundles to send to flashbots. * @param newBurstSize Amount of consecutive blocks we want to send the transactions to try to work the job. * @param flashbots An instance of Flashbots. * @param signer A signer. * @param isWorkableCheck A callback to the function that checks the workability of the job we are trying to work. * @param regenerateTxs An optional callback function that generates the new set of transactions to be included * in the next retry bundles. If not provided, the new bundles will use the previous * set of transactions provided on the txs parameter. * @param bundleRegenerationMethod An optional parameter instructing what bundle creation method we should use to create the new bundles. * Defaults to createBundlesWithSameTxs. * @param recalculatePriorityFeeInWei An optional callback function instructing what priority fee should the new batch * of bundles use, along with whether it should use that priority fee or discard the * new batch and restart execution. If not provided bundles will use the value provided * in the priorityFeeInWeiparameter. * @param staticDebugId Optional static id to help with debugging. Every bundle will share this id. * @param dynamicDebugId Optional dynamic id to help with debugging. Every bundle will have a different * dynamic id. This dynamic id will be recalculated every time a bundle is created. * * @returns A boolean to know whether the bundle was included or not */ export declare function sendAndRetryUntilNotWorkable(props: SendAndRetryUntilNotWorkableProps): Promise<boolean>;