@hyperbridge/sdk 1.9.2 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +18 -0
- package/dist/browser/index.js +46 -19
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.d.ts +18 -0
- package/dist/node/index.js +46 -19
- package/dist/node/index.js.map +1 -1
- package/package.json +1 -1
package/dist/node/index.d.ts
CHANGED
|
@@ -638,6 +638,7 @@ declare class ChainConfigService {
|
|
|
638
638
|
getPopularTokens(chain: string): string[];
|
|
639
639
|
getIntentGatewayV2Address(chain: string): HexString;
|
|
640
640
|
getEntryPointV08Address(chain: string): HexString;
|
|
641
|
+
getCirclePaymasterV08Address(chain: string): HexString | undefined;
|
|
641
642
|
getHyperbridgeAddress(): string;
|
|
642
643
|
/**
|
|
643
644
|
* Get the LayerZero Endpoint ID for the chain
|
|
@@ -2788,6 +2789,11 @@ interface SigningAccount {
|
|
|
2788
2789
|
s: HexString;
|
|
2789
2790
|
yParity: number;
|
|
2790
2791
|
}>;
|
|
2792
|
+
/**
|
|
2793
|
+
* Signs an EIP-712 typed-data payload (e.g. an EIP-2612 USDC permit for the Circle paymaster).
|
|
2794
|
+
* The shape of `typedData` matches viem's `TypedDataDefinition` (domain + types + message).
|
|
2795
|
+
*/
|
|
2796
|
+
signTypedData: (typedData: unknown, chainId?: number) => Promise<HexString>;
|
|
2791
2797
|
}
|
|
2792
2798
|
interface SubmitBidOptions {
|
|
2793
2799
|
order: Order;
|
|
@@ -2804,6 +2810,12 @@ interface SubmitBidOptions {
|
|
|
2804
2810
|
maxPriorityFeePerGas: bigint;
|
|
2805
2811
|
/** Pre-built ERC-7821 calldata encoding the UserOp execution (approvals + fillOrder). */
|
|
2806
2812
|
callData: HexString;
|
|
2813
|
+
/**
|
|
2814
|
+
* Optional packed paymasterAndData for EntryPoint v0.8.
|
|
2815
|
+
* Must be built BEFORE calling prepareSubmitBid so the hash covers paymaster bytes.
|
|
2816
|
+
* Defaults to "0x" (EntryPoint deposit pays gas).
|
|
2817
|
+
*/
|
|
2818
|
+
paymasterAndData?: HexString;
|
|
2807
2819
|
}
|
|
2808
2820
|
interface EstimateFillOrderParams {
|
|
2809
2821
|
order: Order;
|
|
@@ -2831,6 +2843,10 @@ interface FillOrderEstimate {
|
|
|
2831
2843
|
callGasLimit: bigint;
|
|
2832
2844
|
verificationGasLimit: bigint;
|
|
2833
2845
|
preVerificationGas: bigint;
|
|
2846
|
+
/** Paymaster verification gas limit from bundler estimate, or Circle's cap if absent. 0n when no paymaster. */
|
|
2847
|
+
paymasterVerificationGasLimit: bigint;
|
|
2848
|
+
/** Paymaster postOp gas limit from bundler estimate, or Circle's cap if absent. 0n when no paymaster. */
|
|
2849
|
+
paymasterPostOpGasLimit: bigint;
|
|
2834
2850
|
maxFeePerGas: bigint;
|
|
2835
2851
|
maxPriorityFeePerGas: bigint;
|
|
2836
2852
|
totalGasCostWei: bigint;
|
|
@@ -8153,6 +8169,8 @@ interface ChainConfigData {
|
|
|
8153
8169
|
UniswapV4PoolManager?: `0x${string}`;
|
|
8154
8170
|
/** Uniswap V4 StateView (canonical CREATE2 address) for pool state reads via extsload */
|
|
8155
8171
|
UniswapV4StateView?: `0x${string}`;
|
|
8172
|
+
/** Circle Paymaster v0.8 contract address (ERC-4337 onchain USDC paymaster) */
|
|
8173
|
+
CirclePaymasterV08?: `0x${string}`;
|
|
8156
8174
|
};
|
|
8157
8175
|
rpcEnvKey?: string;
|
|
8158
8176
|
defaultRpcUrl?: string;
|
package/dist/node/index.js
CHANGED
|
@@ -3744,7 +3744,8 @@ var chainConfigs = {
|
|
|
3744
3744
|
UniswapV2Factory: "0x0000000000000000000000000000000000000000",
|
|
3745
3745
|
UniswapV3Factory: "0x0000000000000000000000000000000000000000",
|
|
3746
3746
|
Calldispatcher: "0xC7f13b6D03A0A7F3239d38897503E90553ABe155",
|
|
3747
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
3747
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3748
|
+
CirclePaymasterV08: "0x3BA9A96eE3eFf3A69E2B18886AcF52027EFF8966"
|
|
3748
3749
|
},
|
|
3749
3750
|
rpcEnvKey: "SEPOLIA",
|
|
3750
3751
|
defaultRpcUrl: "https://1rpc.io/sepolia",
|
|
@@ -3778,7 +3779,7 @@ var chainConfigs = {
|
|
|
3778
3779
|
addresses: {
|
|
3779
3780
|
IntentGateway: "0x1a4ee689a004b10210a1df9f24a387ea13359acf",
|
|
3780
3781
|
IntentGatewayV2: "0x2d61624A17f361020679FaA16fbB566C344AaF4B",
|
|
3781
|
-
SolverAccount: "
|
|
3782
|
+
SolverAccount: "0x66C4459fa61E5Ca647152EEb6dA56150EE975512",
|
|
3782
3783
|
TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
|
|
3783
3784
|
Host: "0x792A6236AF69787C40cF76b69B4c8c7B28c4cA20",
|
|
3784
3785
|
UniswapRouter02: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
|
|
@@ -3793,6 +3794,7 @@ var chainConfigs = {
|
|
|
3793
3794
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3794
3795
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3795
3796
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3797
|
+
CirclePaymasterV08: "0x0578cFB241215b77442a541325d6A4E6dFE700Ec",
|
|
3796
3798
|
Usdt0Oft: "0x6C96dE32CEa08842dcc4058c14d3aaAD7Fa41dee"
|
|
3797
3799
|
},
|
|
3798
3800
|
rpcEnvKey: "ETH_MAINNET",
|
|
@@ -3833,7 +3835,7 @@ var chainConfigs = {
|
|
|
3833
3835
|
addresses: {
|
|
3834
3836
|
IntentGateway: "0x1a4ee689a004b10210a1df9f24a387ea13359acf",
|
|
3835
3837
|
IntentGatewayV2: "0x2d61624A17f361020679FaA16fbB566C344AaF4B",
|
|
3836
|
-
SolverAccount: "
|
|
3838
|
+
SolverAccount: "0x66C4459fa61E5Ca647152EEb6dA56150EE975512",
|
|
3837
3839
|
TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
|
|
3838
3840
|
Host: "0x24B5d421Ec373FcA57325dd2F0C074009Af021F7",
|
|
3839
3841
|
UniswapRouter02: "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
|
@@ -3890,7 +3892,7 @@ var chainConfigs = {
|
|
|
3890
3892
|
addresses: {
|
|
3891
3893
|
IntentGateway: "0x1a4ee689a004b10210a1df9f24a387ea13359acf",
|
|
3892
3894
|
IntentGatewayV2: "0x2d61624A17f361020679FaA16fbB566C344AaF4B",
|
|
3893
|
-
SolverAccount: "
|
|
3895
|
+
SolverAccount: "0x66C4459fa61E5Ca647152EEb6dA56150EE975512",
|
|
3894
3896
|
TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
|
|
3895
3897
|
Host: "0xE05AFD4Eb2ce6d65c40e1048381BD0Ef8b4B299e",
|
|
3896
3898
|
UniswapRouter02: "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",
|
|
@@ -3905,6 +3907,7 @@ var chainConfigs = {
|
|
|
3905
3907
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3906
3908
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3907
3909
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3910
|
+
CirclePaymasterV08: "0x0578cFB241215b77442a541325d6A4E6dFE700Ec",
|
|
3908
3911
|
Usdt0Oft: "0x14E4A1B13bf7F943c8ff7C51fb60FA964A298D92"
|
|
3909
3912
|
},
|
|
3910
3913
|
rpcEnvKey: "ARBITRUM_MAINNET",
|
|
@@ -3947,7 +3950,7 @@ var chainConfigs = {
|
|
|
3947
3950
|
addresses: {
|
|
3948
3951
|
IntentGateway: "0x1a4ee689a004b10210a1df9f24a387ea13359acf",
|
|
3949
3952
|
IntentGatewayV2: "0x2d61624A17f361020679FaA16fbB566C344AaF4B",
|
|
3950
|
-
SolverAccount: "
|
|
3953
|
+
SolverAccount: "0xb7d5Bb305Fd102C9B0a343978f3b9Accc00e9603",
|
|
3951
3954
|
TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
|
|
3952
3955
|
Host: "0x6FFe92e4d7a9D589549644544780e6725E84b248",
|
|
3953
3956
|
UniswapRouter02: "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",
|
|
@@ -3959,6 +3962,7 @@ var chainConfigs = {
|
|
|
3959
3962
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
3960
3963
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3961
3964
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
3965
|
+
CirclePaymasterV08: "0x0578cFB241215b77442a541325d6A4E6dFE700Ec",
|
|
3962
3966
|
AerodromeRouter: "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",
|
|
3963
3967
|
UniswapV4PositionManager: "0x7c5f5a4bbd8fd63184577525326123b519429bdc",
|
|
3964
3968
|
UniswapV4PoolManager: "0x498581ff718922c3f8e6a244956af099b2652b2b",
|
|
@@ -4005,7 +4009,7 @@ var chainConfigs = {
|
|
|
4005
4009
|
addresses: {
|
|
4006
4010
|
IntentGateway: "0x1a4ee689a004b10210a1df9f24a387ea13359acf",
|
|
4007
4011
|
IntentGatewayV2: "0x2d61624A17f361020679FaA16fbB566C344AaF4B",
|
|
4008
|
-
SolverAccount: "
|
|
4012
|
+
SolverAccount: "0x66C4459fa61E5Ca647152EEb6dA56150EE975512",
|
|
4009
4013
|
TokenGateway: "0x8b536105b6Fae2aE9199f5146D3C57Dfe53b614E",
|
|
4010
4014
|
Host: "0xD8d3db17C1dF65b301D45C84405CcAC1395C559a",
|
|
4011
4015
|
UniswapRouter02: "0xd2f9496824951D5237cC71245D659E48d0d5f9E8",
|
|
@@ -4020,6 +4024,7 @@ var chainConfigs = {
|
|
|
4020
4024
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
4021
4025
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
4022
4026
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
4027
|
+
CirclePaymasterV08: "0x0578cFB241215b77442a541325d6A4E6dFE700Ec",
|
|
4023
4028
|
Usdt0Oft: "0x6BA10300f0DC58B7a1e4c0e41f5daBb7D7829e13"
|
|
4024
4029
|
},
|
|
4025
4030
|
rpcEnvKey: "POLYGON_MAINNET",
|
|
@@ -4052,7 +4057,7 @@ var chainConfigs = {
|
|
|
4052
4057
|
addresses: {
|
|
4053
4058
|
IntentGateway: "0x1a4ee689a004b10210a1df9f24a387ea13359acf",
|
|
4054
4059
|
IntentGatewayV2: "0x2d61624A17f361020679FaA16fbB566C344AaF4B",
|
|
4055
|
-
SolverAccount: "
|
|
4060
|
+
SolverAccount: "0x66C4459fa61E5Ca647152EEb6dA56150EE975512",
|
|
4056
4061
|
TokenGateway: "0x8b536105b6Fae2aE9199f5146D3C57Dfe53b614E",
|
|
4057
4062
|
Host: "0x2A17C1c3616Bbc33FCe5aF5B965F166ba76cEDAf",
|
|
4058
4063
|
UniswapRouter02: "0x284f11109359a7e1306c3e447ef14d38400063ff",
|
|
@@ -4067,6 +4072,7 @@ var chainConfigs = {
|
|
|
4067
4072
|
Calldispatcher: "0xc71251c8b3e7b02697a84363eef6dce8dfbdf333",
|
|
4068
4073
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
4069
4074
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
4075
|
+
CirclePaymasterV08: "0x0578cFB241215b77442a541325d6A4E6dFE700Ec",
|
|
4070
4076
|
Usdt0Oft: "0xc07be8994d035631c36fb4a89c918cefb2f03ec3"
|
|
4071
4077
|
},
|
|
4072
4078
|
rpcEnvKey: "UNICHAIN_MAINNET",
|
|
@@ -4137,6 +4143,7 @@ var chainConfigs = {
|
|
|
4137
4143
|
Calldispatcher: "0x876F1891982E260026630c233A4897160A281Fb8",
|
|
4138
4144
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
4139
4145
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
4146
|
+
CirclePaymasterV08: "0x3BA9A96eE3eFf3A69E2B18886AcF52027EFF8966",
|
|
4140
4147
|
SolverAccount: "0xCDFcFeD7A14154846808FddC8Ba971A2f8a830a3"
|
|
4141
4148
|
},
|
|
4142
4149
|
rpcEnvKey: "POLYGON_AMOY",
|
|
@@ -4161,7 +4168,7 @@ var chainConfigs = {
|
|
|
4161
4168
|
},
|
|
4162
4169
|
addresses: {
|
|
4163
4170
|
IntentGatewayV2: "0x2d61624A17f361020679FaA16fbB566C344AaF4B",
|
|
4164
|
-
SolverAccount: "
|
|
4171
|
+
SolverAccount: "0x66C4459fa61E5Ca647152EEb6dA56150EE975512",
|
|
4165
4172
|
TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
|
|
4166
4173
|
Host: "0x78c8A5F27C06757EA0e30bEa682f1FD5C8d7645d",
|
|
4167
4174
|
UniswapRouter02: "0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2",
|
|
@@ -4170,6 +4177,7 @@ var chainConfigs = {
|
|
|
4170
4177
|
Calldispatcher: "0xC71251c8b3e7B02697A84363Eef6DcE8DfBdF333",
|
|
4171
4178
|
Permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
4172
4179
|
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
4180
|
+
CirclePaymasterV08: "0x0578cFB241215b77442a541325d6A4E6dFE700Ec",
|
|
4173
4181
|
UniswapV4PositionManager: "0x3c3ea4b57a46241e54610e5f022e5c45859a1017",
|
|
4174
4182
|
UniswapV4PoolManager: "0x9a13f98cb987694c9f086b1f5eb990eea8264ec3"
|
|
4175
4183
|
},
|
|
@@ -4253,7 +4261,8 @@ var chainConfigs = {
|
|
|
4253
4261
|
addresses: {
|
|
4254
4262
|
TokenGateway: "0xFcDa26cA021d5535C3059547390E6cCd8De7acA6",
|
|
4255
4263
|
Host: "0x3435bD7e5895356535459D6087D1eB982DAd90e7",
|
|
4256
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
4264
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
4265
|
+
CirclePaymasterV08: "0x3BA9A96eE3eFf3A69E2B18886AcF52027EFF8966"
|
|
4257
4266
|
},
|
|
4258
4267
|
defaultRpcUrl: "https://sepolia-rollup.arbitrum.io/rpc",
|
|
4259
4268
|
consensusStateId: "ETH0",
|
|
@@ -4277,7 +4286,8 @@ var chainConfigs = {
|
|
|
4277
4286
|
addresses: {
|
|
4278
4287
|
TokenGateway: "0xFcDa26cA021d5535C3059547390E6cCd8De7acA6",
|
|
4279
4288
|
Host: "0x6d51b678836d8060d980605d2999eF211809f3C2",
|
|
4280
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
4289
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
4290
|
+
CirclePaymasterV08: "0x3BA9A96eE3eFf3A69E2B18886AcF52027EFF8966"
|
|
4281
4291
|
},
|
|
4282
4292
|
defaultRpcUrl: "https://sepolia.optimism.io",
|
|
4283
4293
|
consensusStateId: "ETH0",
|
|
@@ -4301,7 +4311,8 @@ var chainConfigs = {
|
|
|
4301
4311
|
addresses: {
|
|
4302
4312
|
TokenGateway: "0xFcDa26cA021d5535C3059547390E6cCd8De7acA6",
|
|
4303
4313
|
Host: "0xD198c01839dd4843918617AfD1e4DDf44Cc3BB4a",
|
|
4304
|
-
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
|
|
4314
|
+
EntryPointV08: "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
|
|
4315
|
+
CirclePaymasterV08: "0x3BA9A96eE3eFf3A69E2B18886AcF52027EFF8966"
|
|
4305
4316
|
},
|
|
4306
4317
|
defaultRpcUrl: "https://sepolia.base.org",
|
|
4307
4318
|
consensusStateId: "ETH0",
|
|
@@ -4485,6 +4496,9 @@ var ChainConfigService = class {
|
|
|
4485
4496
|
getEntryPointV08Address(chain) {
|
|
4486
4497
|
return this.getConfig(chain)?.addresses.EntryPointV08;
|
|
4487
4498
|
}
|
|
4499
|
+
getCirclePaymasterV08Address(chain) {
|
|
4500
|
+
return this.getConfig(chain)?.addresses.CirclePaymasterV08;
|
|
4501
|
+
}
|
|
4488
4502
|
getHyperbridgeAddress() {
|
|
4489
4503
|
return hyperbridgeAddress;
|
|
4490
4504
|
}
|
|
@@ -12801,8 +12815,11 @@ var CryptoUtils = class {
|
|
|
12801
12815
|
const factory = hasFactory ? `0x${userOp.initCode.slice(2, 42)}` : void 0;
|
|
12802
12816
|
const factoryData = hasFactory ? `0x${userOp.initCode.slice(42)}` : void 0;
|
|
12803
12817
|
const hasPaymaster = userOp.paymasterAndData && userOp.paymasterAndData !== "0x" && userOp.paymasterAndData.length > 2;
|
|
12804
|
-
const
|
|
12805
|
-
const
|
|
12818
|
+
const pmHex = hasPaymaster ? userOp.paymasterAndData.slice(2) : "";
|
|
12819
|
+
const paymaster = hasPaymaster ? `0x${pmHex.slice(0, 40)}` : void 0;
|
|
12820
|
+
const paymasterVerificationGasLimit = hasPaymaster ? BigInt(`0x${pmHex.slice(40, 72)}`) : void 0;
|
|
12821
|
+
const paymasterPostOpGasLimit = hasPaymaster ? BigInt(`0x${pmHex.slice(72, 104)}`) : void 0;
|
|
12822
|
+
const paymasterData = hasPaymaster ? `0x${pmHex.slice(104)}` : void 0;
|
|
12806
12823
|
const userOpBundler = {
|
|
12807
12824
|
sender: userOp.sender,
|
|
12808
12825
|
nonce: toHex(userOp.nonce),
|
|
@@ -12821,8 +12838,8 @@ var CryptoUtils = class {
|
|
|
12821
12838
|
if (paymaster) {
|
|
12822
12839
|
userOpBundler.paymaster = paymaster;
|
|
12823
12840
|
userOpBundler.paymasterData = paymasterData || "0x";
|
|
12824
|
-
userOpBundler.paymasterVerificationGasLimit = toHex(
|
|
12825
|
-
userOpBundler.paymasterPostOpGasLimit = toHex(
|
|
12841
|
+
userOpBundler.paymasterVerificationGasLimit = toHex(paymasterVerificationGasLimit);
|
|
12842
|
+
userOpBundler.paymasterPostOpGasLimit = toHex(paymasterPostOpGasLimit);
|
|
12826
12843
|
}
|
|
12827
12844
|
return userOpBundler;
|
|
12828
12845
|
}
|
|
@@ -15549,7 +15566,6 @@ var OrderExecutor = class {
|
|
|
15549
15566
|
remainingAssets = fill.remainingAssets;
|
|
15550
15567
|
if (fill.update) {
|
|
15551
15568
|
yield fill.update;
|
|
15552
|
-
if (fill.done) return;
|
|
15553
15569
|
}
|
|
15554
15570
|
}
|
|
15555
15571
|
} catch (err) {
|
|
@@ -16066,7 +16082,8 @@ var BidManager = class {
|
|
|
16066
16082
|
preVerificationGas,
|
|
16067
16083
|
maxFeePerGas,
|
|
16068
16084
|
maxPriorityFeePerGas,
|
|
16069
|
-
callData
|
|
16085
|
+
callData,
|
|
16086
|
+
paymasterAndData = "0x"
|
|
16070
16087
|
} = options;
|
|
16071
16088
|
const chainId = BigInt(
|
|
16072
16089
|
this.ctx.dest.client.chain?.id ?? Number.parseInt(this.ctx.dest.config.stateMachineId.split("-")[1])
|
|
@@ -16081,7 +16098,7 @@ var BidManager = class {
|
|
|
16081
16098
|
accountGasLimits,
|
|
16082
16099
|
preVerificationGas,
|
|
16083
16100
|
gasFees,
|
|
16084
|
-
paymasterAndData
|
|
16101
|
+
paymasterAndData,
|
|
16085
16102
|
signature: "0x"
|
|
16086
16103
|
};
|
|
16087
16104
|
const userOpHash = this.crypto.computeUserOpHash(userOp, entryPointAddress, chainId);
|
|
@@ -18207,6 +18224,8 @@ var GasEstimator = class {
|
|
|
18207
18224
|
let callGasLimit = 500000n;
|
|
18208
18225
|
let verificationGasLimit = 100000n;
|
|
18209
18226
|
let preVerificationGas = 100000n;
|
|
18227
|
+
let paymasterVerificationGasLimit = 0n;
|
|
18228
|
+
let paymasterPostOpGasLimit = 0n;
|
|
18210
18229
|
if (this.ctx.bundlerUrl) {
|
|
18211
18230
|
try {
|
|
18212
18231
|
const callData = this.crypto.encodeERC7821Execute([
|
|
@@ -18294,6 +18313,12 @@ var GasEstimator = class {
|
|
|
18294
18313
|
callGasLimit = BigInt(gasEstimate.callGasLimit) * 160n / 100n;
|
|
18295
18314
|
verificationGasLimit = BigInt(gasEstimate.verificationGasLimit) * 105n / 100n;
|
|
18296
18315
|
preVerificationGas = BigInt(gasEstimate.preVerificationGas) * 105n / 100n;
|
|
18316
|
+
if (gasEstimate.paymasterVerificationGasLimit) {
|
|
18317
|
+
paymasterVerificationGasLimit = BigInt(gasEstimate.paymasterVerificationGasLimit) * 105n / 100n;
|
|
18318
|
+
}
|
|
18319
|
+
if (gasEstimate.paymasterPostOpGasLimit) {
|
|
18320
|
+
paymasterPostOpGasLimit = BigInt(gasEstimate.paymasterPostOpGasLimit) * 105n / 100n;
|
|
18321
|
+
}
|
|
18297
18322
|
if (pimlicoGasPrices) {
|
|
18298
18323
|
const level = pimlicoGasPrices.fast ?? pimlicoGasPrices.standard ?? pimlicoGasPrices.slow ?? null;
|
|
18299
18324
|
if (level) {
|
|
@@ -18330,7 +18355,7 @@ var GasEstimator = class {
|
|
|
18330
18355
|
console.warn("fillOrder gas estimation failed, using fallback:", e);
|
|
18331
18356
|
}
|
|
18332
18357
|
}
|
|
18333
|
-
const totalGas = callGasLimit + verificationGasLimit + preVerificationGas;
|
|
18358
|
+
const totalGas = callGasLimit + verificationGasLimit + preVerificationGas + paymasterVerificationGasLimit + paymasterPostOpGasLimit;
|
|
18334
18359
|
const rawTotalGasCostWei = totalGas * maxFeePerGas;
|
|
18335
18360
|
const totalGasInDestFeeToken = await convertGasToFeeToken(
|
|
18336
18361
|
this.ctx,
|
|
@@ -18345,6 +18370,8 @@ var GasEstimator = class {
|
|
|
18345
18370
|
callGasLimit,
|
|
18346
18371
|
verificationGasLimit,
|
|
18347
18372
|
preVerificationGas,
|
|
18373
|
+
paymasterVerificationGasLimit,
|
|
18374
|
+
paymasterPostOpGasLimit,
|
|
18348
18375
|
maxFeePerGas,
|
|
18349
18376
|
maxPriorityFeePerGas,
|
|
18350
18377
|
totalGasCostWei,
|