Skip to content

Commit c9edb5f

Browse files
committed
gas from ZERO to something
1 parent 49638ca commit c9edb5f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/wallet.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,19 +2282,20 @@ pub struct UserOperationBuilder {
22822282
}
22832283

22842284
impl UserOperationBuilder {
2285-
/// Create a new UserOperation builder
2285+
/// Create a new UserOperationBuilder with defaults
22862286
pub fn new(sender: EthAddress, chain_id: u64) -> Self {
22872287
Self {
22882288
sender,
22892289
nonce: U256::ZERO,
2290-
init_code: vec![],
2291-
call_data: vec![],
2290+
init_code: Vec::new(),
2291+
call_data: Vec::new(),
22922292
call_gas_limit: U256::from(100_000),
22932293
verification_gas_limit: U256::from(150_000),
22942294
pre_verification_gas: U256::from(21_000),
2295-
max_fee_per_gas: U256::ZERO,
2296-
max_priority_fee_per_gas: U256::ZERO,
2297-
paymaster_and_data: vec![],
2295+
// Set reasonable gas prices for Base chain
2296+
max_fee_per_gas: U256::from(50_000_000), // 0.05 gwei
2297+
max_priority_fee_per_gas: U256::from(50_000_000), // 0.05 gwei
2298+
paymaster_and_data: Vec::new(),
22982299
chain_id,
22992300
}
23002301
}

0 commit comments

Comments
 (0)