-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump package and refactor scripts (#3)
* fix: added try catch in workable fn * feat: slow mode * fix: using alchemy provider only for logs * refactor: newAutomatedVault without restart * fix: added some logs * fix: yearn batch strategies * style: lint * fix: reduced batch size to 80 * feat: increased gas limit on factory-harvest-v1 * feat: added multiple builders * feat: upgraded scripting utils version * fix: reduced strategies batch to half * fix: reduced to 30 now * feat: upgraded scriptings version for better logs * fix: reduce gas limit to 10M * chore: cleanup package * fix: reducing gas limit to 10m * feat: upgrade to newest canary * fix: env example * feat: bump keeper utils --------- Co-authored-by: 0xGorilla <[email protected]> Co-authored-by: 0xGorilla <[email protected]>
- Loading branch information
1 parent
5791b9a
commit 2af8c08
Showing
9 changed files
with
158 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
RPC_HTTP_MAINNET_URI= | ||
RPC_WSS_MAINNET_URI= | ||
RPC_HTTP_MAINNET_URI_FOR_LOGS= | ||
TX_SIGNER_PRIVATE_KEY= | ||
BUNDLE_SIGNER_PRIVATE_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
import {getMainnetSdk} from '@dethcrypto/eth-sdk-client'; | ||
import {providers, Wallet} from 'ethers'; | ||
import {FlashbotsBundleProvider} from '@flashbots/ethers-provider-bundle'; | ||
import {FlashbotsBroadcastor, getEnvVariable} from '@keep3r-network/keeper-scripting-utils'; | ||
import {PrivateBroadcastor, getEnvVariable} from '@keep3r-network/keeper-scripting-utils'; | ||
import {factoryHarvestV1Run} from './shared/factory-harvest-v1-run'; | ||
|
||
// SETUP | ||
const WORK_FUNCTION = 'work'; | ||
const GAS_LIMIT = 10_000_000; | ||
const PRIORITY_FEE = 1.5e9; | ||
const PRIORITY_FEE = 2e9; | ||
const builders = ['https://rpc.titanbuilder.xyz/', 'https://rpc.beaverbuild.org/']; | ||
|
||
(async () => { | ||
// ENVIRONMENT | ||
const provider = new providers.JsonRpcProvider(getEnvVariable('RPC_HTTP_MAINNET_URI')); | ||
const providerForLogs = new providers.JsonRpcProvider(getEnvVariable('RPC_HTTP_MAINNET_URI_FOR_LOGS')); | ||
const txSigner = new Wallet(getEnvVariable('TX_SIGNER_PRIVATE_KEY'), provider); | ||
const bundleSigner = new Wallet(getEnvVariable('BUNDLE_SIGNER_PRIVATE_KEY'), provider); | ||
const chainId = 1; | ||
|
||
// CONTRACTS | ||
const job = getMainnetSdk(txSigner).publicKeeperJob; | ||
|
||
// PROVIDERS | ||
const flashbotsProvider = await FlashbotsBundleProvider.create(provider, bundleSigner); | ||
|
||
const flashbotBroadcastor = new FlashbotsBroadcastor(flashbotsProvider, PRIORITY_FEE, GAS_LIMIT); | ||
const broadcastor = new PrivateBroadcastor(builders, PRIORITY_FEE, GAS_LIMIT, true, chainId); | ||
|
||
// INITIALIZE | ||
await factoryHarvestV1Run(job, provider, WORK_FUNCTION, flashbotBroadcastor.tryToWorkOnFlashbots.bind(flashbotBroadcastor)); | ||
await factoryHarvestV1Run(job, provider, providerForLogs, WORK_FUNCTION, broadcastor.tryToWork.bind(broadcastor)); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
import {getMainnetSdk} from '@dethcrypto/eth-sdk-client'; | ||
import {providers, Wallet} from 'ethers'; | ||
import {FlashbotsBundleProvider} from '@flashbots/ethers-provider-bundle'; | ||
import {getEnvVariable, StealthBroadcastor} from '@keep3r-network/keeper-scripting-utils/'; | ||
import {testV2Keep3rRun} from './shared/v2-keeper-run'; | ||
import {v2Keep3rRun} from './shared/v2-keeper-run'; | ||
|
||
// SETUP | ||
const WORK_FUNCTION = 'work'; | ||
const GAS_LIMIT = 10_000_000; | ||
const PRIORITY_FEE = 2e9; | ||
const GAS_LIMIT = 5_000_000; | ||
const BURST_SIZE = 2; | ||
const builders = ['https://rpc.titanbuilder.xyz/', 'https://rpc.beaverbuild.org/']; | ||
|
||
(async () => { | ||
// ENVIRONMENT | ||
const provider = new providers.JsonRpcProvider(getEnvVariable('RPC_HTTP_MAINNET_URI')); | ||
const txSigner = new Wallet(getEnvVariable('TX_SIGNER_PRIVATE_KEY'), provider); | ||
const bundleSigner = new Wallet(getEnvVariable('BUNDLE_SIGNER_PRIVATE_KEY'), provider); | ||
const chainId = 1; | ||
|
||
// CONTRACTS | ||
const harvestJob = getMainnetSdk(txSigner).harvestV2Keep3rV2; | ||
const stealthRelayer = getMainnetSdk(txSigner).stealthRelayer; | ||
|
||
// PROVIDERS | ||
const flashbotsProvider = await FlashbotsBundleProvider.create(provider, bundleSigner); | ||
const rpcStealthBroacastor = new StealthBroadcastor(flashbotsProvider, stealthRelayer, PRIORITY_FEE, GAS_LIMIT, BURST_SIZE); | ||
const broadcastor = new StealthBroadcastor(builders, stealthRelayer, PRIORITY_FEE, GAS_LIMIT, true, chainId); | ||
|
||
// INITIALIZE | ||
await testV2Keep3rRun(harvestJob, provider, WORK_FUNCTION, rpcStealthBroacastor.tryToWorkOnStealthRelayer.bind(rpcStealthBroacastor)); | ||
await v2Keep3rRun(harvestJob, provider, WORK_FUNCTION, broadcastor.tryToWork.bind(broadcastor)); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
import {getMainnetSdk} from '@dethcrypto/eth-sdk-client'; | ||
import {providers, Wallet} from 'ethers'; | ||
import {FlashbotsBundleProvider} from '@flashbots/ethers-provider-bundle'; | ||
import {FlashbotsBroadcastor, getEnvVariable} from '@keep3r-network/keeper-scripting-utils'; | ||
import {testV2Keep3rRun} from './shared/v2-keeper-run'; | ||
import {getEnvVariable, PrivateBroadcastor} from '@keep3r-network/keeper-scripting-utils'; | ||
import {v2Keep3rRun} from './shared/v2-keeper-run'; | ||
|
||
// SETUP | ||
const WORK_FUNCTION = 'work'; | ||
const GAS_LIMIT = 10_000_000; | ||
const PRIORITY_FEE = 1.5e9; | ||
const PRIORITY_FEE = 2e9; | ||
const builders = ['https://rpc.titanbuilder.xyz/', 'https://rpc.beaverbuild.org/']; | ||
|
||
(async () => { | ||
// ENVIRONMENT | ||
const provider = new providers.JsonRpcProvider(getEnvVariable('RPC_HTTP_MAINNET_URI')); | ||
const txSigner = new Wallet(getEnvVariable('TX_SIGNER_PRIVATE_KEY'), provider); | ||
const bundleSigner = new Wallet(getEnvVariable('BUNDLE_SIGNER_PRIVATE_KEY'), provider); | ||
const chainId = 1; | ||
|
||
// CONTRACTS | ||
const tendJob = getMainnetSdk(txSigner).tendV2Keep3rV2; | ||
|
||
// PROVIDERS | ||
const flashbotsProvider = await FlashbotsBundleProvider.create(provider, bundleSigner); | ||
const flashbotBroadcastor = new FlashbotsBroadcastor(flashbotsProvider, PRIORITY_FEE, GAS_LIMIT); | ||
const broadcastor = new PrivateBroadcastor(builders, PRIORITY_FEE, GAS_LIMIT, true, chainId); | ||
|
||
// INITIALIZE | ||
await testV2Keep3rRun(tendJob, provider, WORK_FUNCTION, flashbotBroadcastor.tryToWorkOnFlashbots.bind(flashbotBroadcastor)); | ||
await v2Keep3rRun(tendJob, provider, WORK_FUNCTION, broadcastor.tryToWork.bind(broadcastor)); | ||
})(); |
Oops, something went wrong.