-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge the develop branch to the master branch, preparation to v3.4.0
This merge contains the following set of changes: * [Oracle, Improvement] Refetch old logs ranges to see if there are missed events (#627) * [Oracle, Improvement] Add support for EIP1559 gas price oracle (#631) * [Oracle, Improvement] CollectedSignatures AMB watcher for MEV bundling (#634) * [Oracle, Fix] Fix eip1559 transaction sending problems (#632)
- Loading branch information
Showing
37 changed files
with
1,850 additions
and
120 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
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const baseConfig = require('./base.config') | ||
|
||
const { DEFAULT_TRANSACTION_RESEND_INTERVAL } = require('../src/utils/constants') | ||
const { MEV_HELPER_ABI } = require('../src/utils/mev') | ||
const { web3Foreign, getFlashbotsProvider } = require('../src/services/web3') | ||
|
||
const { | ||
ORACLE_FOREIGN_TX_RESEND_INTERVAL, | ||
ORACLE_MEV_FOREIGN_HELPER_CONTRACT_ADDRESS, | ||
ORACLE_MEV_FOREIGN_MIN_GAS_PRICE, | ||
ORACLE_MEV_FOREIGN_FLAT_MINER_FEE, | ||
ORACLE_MEV_FOREIGN_MAX_PRIORITY_FEE_PER_GAS, | ||
ORACLE_MEV_FOREIGN_MAX_FEE_PER_GAS, | ||
ORACLE_MEV_FOREIGN_BUNDLES_BLOCK_RANGE | ||
} = process.env | ||
|
||
const contract = new baseConfig.foreign.web3.eth.Contract(MEV_HELPER_ABI, ORACLE_MEV_FOREIGN_HELPER_CONTRACT_ADDRESS) | ||
|
||
module.exports = { | ||
...baseConfig, | ||
pollingInterval: baseConfig.foreign.pollingInterval, | ||
mevForeign: { | ||
contractAddress: ORACLE_MEV_FOREIGN_HELPER_CONTRACT_ADDRESS, | ||
contract, | ||
minGasPrice: ORACLE_MEV_FOREIGN_MIN_GAS_PRICE, | ||
flatMinerFee: ORACLE_MEV_FOREIGN_FLAT_MINER_FEE, | ||
maxPriorityFeePerGas: ORACLE_MEV_FOREIGN_MAX_PRIORITY_FEE_PER_GAS, | ||
maxFeePerGas: ORACLE_MEV_FOREIGN_MAX_FEE_PER_GAS, | ||
bundlesPerIteration: Math.max(parseInt(ORACLE_MEV_FOREIGN_BUNDLES_BLOCK_RANGE, 10) || 5, 1), | ||
getFlashbotsProvider | ||
}, | ||
mevJobsRedisKey: `${baseConfig.id}-collected-signatures-mev:mevJobs`, | ||
id: 'mev-sender-foreign', | ||
name: 'mev-sender-foreign', | ||
web3: web3Foreign, | ||
resendInterval: parseInt(ORACLE_FOREIGN_TX_RESEND_INTERVAL, 10) || DEFAULT_TRANSACTION_RESEND_INTERVAL | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const baseConfig = require('./base.config') | ||
const { MEV_HELPER_ABI } = require('../src/utils/mev') | ||
|
||
const { | ||
ORACLE_MEV_FOREIGN_HELPER_CONTRACT_ADDRESS, | ||
ORACLE_MEV_FOREIGN_MIN_GAS_PRICE, | ||
ORACLE_MEV_FOREIGN_FLAT_MINER_FEE, | ||
ORACLE_MEV_FOREIGN_MAX_PRIORITY_FEE_PER_GAS, | ||
ORACLE_MEV_FOREIGN_MAX_FEE_PER_GAS | ||
} = process.env | ||
|
||
const id = `${baseConfig.id}-collected-signatures-mev` | ||
|
||
const contract = new baseConfig.foreign.web3.eth.Contract(MEV_HELPER_ABI, ORACLE_MEV_FOREIGN_HELPER_CONTRACT_ADDRESS) | ||
|
||
module.exports = { | ||
...baseConfig, | ||
mevForeign: { | ||
contractAddress: ORACLE_MEV_FOREIGN_HELPER_CONTRACT_ADDRESS, | ||
contract, | ||
minGasPrice: ORACLE_MEV_FOREIGN_MIN_GAS_PRICE, | ||
flatMinerFee: ORACLE_MEV_FOREIGN_FLAT_MINER_FEE, | ||
maxPriorityFeePerGas: ORACLE_MEV_FOREIGN_MAX_PRIORITY_FEE_PER_GAS, | ||
maxFeePerGas: ORACLE_MEV_FOREIGN_MAX_FEE_PER_GAS | ||
}, | ||
main: baseConfig.home, | ||
event: 'CollectedSignatures', | ||
name: `watcher-${id}`, | ||
id | ||
} |
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
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
Oops, something went wrong.