Skip to content

Commit

Permalink
Merge pull request #756 from bcnmy/feature/ep7-chain-integrations
Browse files Browse the repository at this point in the history
Feature/ep7 chain integrations
  • Loading branch information
TheDivic authored Dec 20, 2024
2 parents 3c5e99e + 79e2fea commit 2600386
Show file tree
Hide file tree
Showing 17 changed files with 1,349 additions and 998 deletions.
10 changes: 7 additions & 3 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
196, 2810, 997, 713715, 3799, 167009, 80084, 5845, 167000, 1328, 1329, 995,
28882, 288, 920637907288165, 1740, 1750, 4202, 1135, 2818
],
"supportedNetworksV07": [84532, 8453, 10, 11155420],
"supportedNetworksV07": [
84532, 8453, 10, 11155420, 56, 42161, 137, 100, 80084
],
"EIP1559SupportedNetworks": [
1, 137, 42161, 10, 43114, 43113, 8453, 59144, 204, 5611, 421614, 11155111,
84532, 168587773, 81457, 42170, 169, 56400, 11155420, 80002, 27827, 4653,
Expand All @@ -32,7 +34,7 @@
"supportedNetworks": [1, 11155111],
"confidenceLevel": 99
},
"supportsDebugTraceCall": [1, 11155111],
"supportsDebugTraceCall": [],
"supportedTransactionType": {
"1": ["BUNDLER"],
"137": ["BUNDLER"],
Expand Down Expand Up @@ -1023,7 +1025,9 @@
},
"entryPointV07Data": {
"0x0000000071727De22E5E9d8BAf0edAc6f37da032": {
"supportedChainIds": [84532, 8453, 10, 11155420]
"supportedChainIds": [
84532, 8453, 10, 11155420, 42161, 56, 42161, 137, 100, 80084
]
}
},
"zeroAddress": "0x0000000000000000000000000000000000000000",
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"dependencies": {
"@arbitrum/sdk": "^3.1.3",
"@biconomy/gas-estimations": "0.2.51",
"@slack/web-api": "^6.8.0",
"@types/config": "^3.3.3",
"@types/crypto-js": "^4.1.1",
Expand All @@ -33,7 +34,6 @@
"crypto-js": "^4.1.1",
"dd-trace": "^4.17.0",
"dotenv": "^16.0.3",
"entry-point-gas-estimations": "1.0.2",
"ethereumjs-util": "^7.1.5",
"express": "^4.18.2",
"express-handlebars": "^6.0.6",
Expand All @@ -59,11 +59,13 @@
"rest-api-errors": "^1.2.5",
"serialize-error": "8.1.0",
"typescript": "^5.3.3",
"viem": "^2.21.28"
"viem": "^2.21.49"
},
"devDependencies": {
"@biconomy/account": "^4.5.7",
"@biconomy/sdk": "^0.0.19",
"@eslint/js": "^9.13.0",
"@rhinestone/module-sdk": "^0.1.32",
"@types/amqplib": "^0.8.2",
"@types/big.js": "^6.1.5",
"@types/consolidate": "^0.14.1",
Expand Down
19 changes: 11 additions & 8 deletions src/admin-scripts/getRequiredPrefund.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

function getRequiredPrefund(userOp: {
import { formatEther } from "viem";

export function getRequiredPrefund(userOp: {
paymasterAndData: string;
callGasLimit: bigint;
verificationGasLimit: bigint;
Expand All @@ -17,11 +18,13 @@ function getRequiredPrefund(userOp: {
}

const prefund = getRequiredPrefund({
paymasterAndData: "0x",
callGasLimit: 651983n,
verificationGasLimit: 1459741n,
preVerificationGas: 313507n,
maxFeePerGas: 15796905452n,
paymasterAndData:
"0x00000f79b7faf42eebadba19acc07cd08af447890000000000000000000000005430eac2228c12577ed5179a4dee3aaa56a238a600000000000000000000000000000000000000000000000000000000676469c800000000000000000000000000000000000000000000000000000000676462c0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000413824432901286f0f7794774baa5b55728fdccee0a7884049992c7f82471299477f978db2c8ce464433153e134f39af1a265406475b104bef19aa9cd2758e90da1c00000000000000000000000000000000000000000000000000000000000000",
callGasLimit: 24276n,
verificationGasLimit: 297166n,
preVerificationGas: 493353887n,
maxFeePerGas: 16261619n,
});

console.log(`Required prefund: ${prefund} wei`);
console.log(`Required prefund: ${formatEther(prefund)} ETH`);
// old pvg: 523923235734
4 changes: 4 additions & 0 deletions src/common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export enum BLOCKCHAINS {
MORPH_MAINNET = 2818,
MORPH_HOLESKY_TESTNET = 2810,
FIRECHAIN_TESTNET = 997,
FIRECHAIN_MAINNET = 995,
SEI_DEVNET_ARCTIC_1 = 713715,
SEI_TESTNET_ATLANTIC_2 = 1328,
SEI_MAINNET = 1329,
Expand All @@ -63,4 +64,7 @@ export enum BLOCKCHAINS {
METAL_L2_MAINNET = 1750,
LISK_TESTNET = 4202,
LISK_MAINNET = 1135,
BOBA_SEPOLIA_TESTNET = 28882,
BOBA_MAINNET = 288,
MOONBEAM_MAINNET = 1284,
}
8 changes: 4 additions & 4 deletions src/common/service-manager/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nodeconfig from "config";
import { getContract, parseEther } from "viem";
import { chain } from "lodash";
import { ENTRY_POINT_ABI } from "entry-point-gas-estimations/dist/gas-estimator/entry-point-v6";
import { config } from "../../config";
import { EVMAccount, IEVMAccount } from "../../relayer/account";
import { BundlerConsumer } from "../../relayer/consumer";
Expand Down Expand Up @@ -45,8 +44,9 @@ import { UserOperationStateDAO } from "../db/dao/UserOperationStateDAO";
import { customJSONStringify, parseError } from "../utils";
import { GasPriceService } from "../gas-price";
import { CacheFeesJob } from "../gas-price/jobs/CacheFees";
import { ENTRY_POINT_V07_ABI } from "../entrypoint-v7/abiv7";
import { FlashbotsClient } from "../network/FlashbotsClient";
import { ENTRYPOINT_V6_ABI } from "@biconomy/gas-estimations";
import { ENTRYPOINT_V7_ABI } from "@biconomy/gas-estimations";

const log = logger.child({
module: module.filename.split("/").slice(-4).join("/"),
Expand Down Expand Up @@ -358,7 +358,7 @@ async function setupNetwork(
entryPointMap[chainId].push({
address: entryPointAddress,
entryPointContract: getContract({
abi: ENTRY_POINT_ABI,
abi: ENTRYPOINT_V6_ABI,
address: entryPointAddress as `0x${string}`,
client: {
public: networkService.provider,
Expand All @@ -376,7 +376,7 @@ async function setupNetwork(
entryPointMapV07[chainId].push({
address: entryPointAddress,
entryPointContract: getContract({
abi: ENTRY_POINT_V07_ABI,
abi: ENTRYPOINT_V7_ABI,
address: entryPointAddress as `0x${string}`,
client: {
public: networkService.provider,
Expand Down
157 changes: 0 additions & 157 deletions src/common/simulation/BundlerSimulationService.test.ts

This file was deleted.

Loading

0 comments on commit 2600386

Please sign in to comment.