Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit a03d6ce

Browse files
authored
Update EntryPoint to eth-infinitism/account-abstraction@v0.4.0 (#75)
1 parent 751f3e8 commit a03d6ce

File tree

7 files changed

+252
-71
lines changed

7 files changed

+252
-71
lines changed

abi/entrypoint.json

Lines changed: 113 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
[
2+
{
3+
"inputs": [
4+
{ "internalType": "uint256", "name": "preOpGas", "type": "uint256" },
5+
{ "internalType": "uint256", "name": "paid", "type": "uint256" },
6+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
7+
{
8+
"internalType": "uint256",
9+
"name": "paymasterDeadline",
10+
"type": "uint256"
11+
}
12+
],
13+
"name": "ExecutionResult",
14+
"type": "error"
15+
},
216
{
317
"inputs": [
418
{ "internalType": "uint256", "name": "opIndex", "type": "uint256" },
@@ -24,9 +38,26 @@
2438
},
2539
{
2640
"inputs": [
27-
{ "internalType": "uint256", "name": "preOpGas", "type": "uint256" },
28-
{ "internalType": "uint256", "name": "prefund", "type": "uint256" },
29-
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
41+
{
42+
"components": [
43+
{ "internalType": "uint256", "name": "preOpGas", "type": "uint256" },
44+
{ "internalType": "uint256", "name": "prefund", "type": "uint256" },
45+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
46+
{
47+
"internalType": "uint256",
48+
"name": "paymasterDeadline",
49+
"type": "uint256"
50+
},
51+
{
52+
"internalType": "bytes",
53+
"name": "paymasterContext",
54+
"type": "bytes"
55+
}
56+
],
57+
"internalType": "struct IEntryPoint.ReturnInfo",
58+
"name": "returnInfo",
59+
"type": "tuple"
60+
},
3061
{
3162
"components": [
3263
{ "internalType": "uint256", "name": "stake", "type": "uint256" },
@@ -67,14 +98,31 @@
6798
"type": "tuple"
6899
}
69100
],
70-
"name": "SimulationResult",
101+
"name": "ValidationResult",
71102
"type": "error"
72103
},
73104
{
74105
"inputs": [
75-
{ "internalType": "uint256", "name": "preOpGas", "type": "uint256" },
76-
{ "internalType": "uint256", "name": "prefund", "type": "uint256" },
77-
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
106+
{
107+
"components": [
108+
{ "internalType": "uint256", "name": "preOpGas", "type": "uint256" },
109+
{ "internalType": "uint256", "name": "prefund", "type": "uint256" },
110+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
111+
{
112+
"internalType": "uint256",
113+
"name": "paymasterDeadline",
114+
"type": "uint256"
115+
},
116+
{
117+
"internalType": "bytes",
118+
"name": "paymasterContext",
119+
"type": "bytes"
120+
}
121+
],
122+
"internalType": "struct IEntryPoint.ReturnInfo",
123+
"name": "returnInfo",
124+
"type": "tuple"
125+
},
78126
{
79127
"components": [
80128
{ "internalType": "uint256", "name": "stake", "type": "uint256" },
@@ -140,7 +188,7 @@
140188
"type": "tuple"
141189
}
142190
],
143-
"name": "SimulationResultWithAggregation",
191+
"name": "ValidationResultWithAggregation",
144192
"type": "error"
145193
},
146194
{
@@ -380,6 +428,13 @@
380428
"name": "Withdrawn",
381429
"type": "event"
382430
},
431+
{
432+
"inputs": [],
433+
"name": "SIG_VALIDATION_FAILED",
434+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
435+
"stateMutability": "view",
436+
"type": "function"
437+
},
383438
{
384439
"inputs": [
385440
{ "internalType": "uint32", "name": "_unstakeDelaySec", "type": "uint32" }
@@ -706,6 +761,56 @@
706761
"stateMutability": "nonpayable",
707762
"type": "function"
708763
},
764+
{
765+
"inputs": [
766+
{
767+
"components": [
768+
{ "internalType": "address", "name": "sender", "type": "address" },
769+
{ "internalType": "uint256", "name": "nonce", "type": "uint256" },
770+
{ "internalType": "bytes", "name": "initCode", "type": "bytes" },
771+
{ "internalType": "bytes", "name": "callData", "type": "bytes" },
772+
{
773+
"internalType": "uint256",
774+
"name": "callGasLimit",
775+
"type": "uint256"
776+
},
777+
{
778+
"internalType": "uint256",
779+
"name": "verificationGasLimit",
780+
"type": "uint256"
781+
},
782+
{
783+
"internalType": "uint256",
784+
"name": "preVerificationGas",
785+
"type": "uint256"
786+
},
787+
{
788+
"internalType": "uint256",
789+
"name": "maxFeePerGas",
790+
"type": "uint256"
791+
},
792+
{
793+
"internalType": "uint256",
794+
"name": "maxPriorityFeePerGas",
795+
"type": "uint256"
796+
},
797+
{
798+
"internalType": "bytes",
799+
"name": "paymasterAndData",
800+
"type": "bytes"
801+
},
802+
{ "internalType": "bytes", "name": "signature", "type": "bytes" }
803+
],
804+
"internalType": "struct UserOperation",
805+
"name": "op",
806+
"type": "tuple"
807+
}
808+
],
809+
"name": "simulateHandleOp",
810+
"outputs": [],
811+
"stateMutability": "nonpayable",
812+
"type": "function"
813+
},
709814
{
710815
"inputs": [
711816
{

internal/config/values.go

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func GetValues() *Values {
4343
// Default variables
4444
viper.SetDefault("erc4337_bundler_port", 4337)
4545
viper.SetDefault("erc4337_bundler_data_directory", "/tmp/stackup_bundler")
46-
viper.SetDefault("erc4337_bundler_supported_entry_points", "0x78d4f01f56b982a3B03C4E127A5D3aFa8EBee686")
46+
viper.SetDefault("erc4337_bundler_supported_entry_points", "0x1306b01bC3e4AD202612D3843387e94737673F53")
4747
viper.SetDefault("erc4337_bundler_max_verification_gas", 1500000)
4848
viper.SetDefault("erc4337_bundler_gin_mode", gin.ReleaseMode)
4949

@@ -87,7 +87,8 @@ func GetValues() *Values {
8787
}
8888

8989
// Validate required variables
90-
if !viper.IsSet("erc4337_bundler_eth_client_url") || viper.GetString("erc4337_bundler_eth_client_url") == "" {
90+
if !viper.IsSet("erc4337_bundler_eth_client_url") ||
91+
viper.GetString("erc4337_bundler_eth_client_url") == "" {
9192
panic("Fatal config error: erc4337_bundler_eth_client_url not set")
9293
}
9394

@@ -110,15 +111,23 @@ func GetValues() *Values {
110111
}
111112

112113
// Return Values
114+
privateKey := viper.GetString("erc4337_bundler_private_key")
115+
ethClientUrl := viper.GetString("erc4337_bundler_eth_client_url")
116+
port := viper.GetInt("erc4337_bundler_port")
117+
dataDirectory := viper.GetString("erc4337_bundler_data_directory")
118+
supportedEntryPoints := envArrayToAddressSlice(viper.GetString("erc4337_bundler_supported_entry_points"))
119+
beneficiary := viper.GetString("erc4337_bundler_beneficiary")
120+
maxVerificationGas := big.NewInt(int64(viper.GetInt("erc4337_bundler_max_verification_gas")))
121+
ginMode := viper.GetString("erc4337_bundler_gin_mode")
113122
return &Values{
114-
PrivateKey: viper.GetString("erc4337_bundler_private_key"),
115-
EthClientUrl: viper.GetString("erc4337_bundler_eth_client_url"),
116-
Port: viper.GetInt("erc4337_bundler_port"),
117-
DataDirectory: viper.GetString("erc4337_bundler_data_directory"),
118-
SupportedEntryPoints: envArrayToAddressSlice(viper.GetString("erc4337_bundler_supported_entry_points")),
119-
Beneficiary: viper.GetString("erc4337_bundler_beneficiary"),
120-
MaxVerificationGas: big.NewInt(int64(viper.GetInt("erc4337_bundler_max_verification_gas"))),
121-
GinMode: viper.GetString("erc4337_bundler_gin_mode"),
123+
PrivateKey: privateKey,
124+
EthClientUrl: ethClientUrl,
125+
Port: port,
126+
DataDirectory: dataDirectory,
127+
SupportedEntryPoints: supportedEntryPoints,
128+
Beneficiary: beneficiary,
129+
MaxVerificationGas: maxVerificationGas,
130+
GinMode: ginMode,
122131
BundlerCollectorTracer: bct,
123132
}
124133
}

0 commit comments

Comments
 (0)