Skip to content

Commit

Permalink
feat(bundler): extending supported bundler operations (#888)
Browse files Browse the repository at this point in the history
* feat(bundler): extending supported bundler operations

* fix: fixing mock usage
  • Loading branch information
geekbrother authored Jan 8, 2025
1 parent 31d71d3 commit a9bc59b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/providers/mock_alto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ impl BundlerOpsProvider for MockAltoProvider {
| SupportedBundlerOps::EthGetUserOperationReceipt
| SupportedBundlerOps::EthEstimateUserOperationGas
| SupportedBundlerOps::PimlicoGetUserOperationGasPrice => self.bundler_url.clone(),
SupportedBundlerOps::PmSponsorUserOperation => self.paymaster_url.clone(),
SupportedBundlerOps::PmSponsorUserOperation
| SupportedBundlerOps::PmGetPaymasterData
| SupportedBundlerOps::PmGetPaymasterStubData => self.paymaster_url.clone(),
};
let response = self
.http_client
Expand Down Expand Up @@ -84,6 +86,8 @@ impl BundlerOpsProvider for MockAltoProvider {
"eth_estimateUserOperationGas".into()
}
SupportedBundlerOps::PmSponsorUserOperation => "pm_sponsorUserOperation".into(),
SupportedBundlerOps::PmGetPaymasterData => "pm_getPaymasterData".into(),
SupportedBundlerOps::PmGetPaymasterStubData => "pm_getPaymasterStubData".into(),
SupportedBundlerOps::PimlicoGetUserOperationGasPrice => {
"pimlico_getUserOperationGasPrice".into()
}
Expand Down
4 changes: 4 additions & 0 deletions src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,10 @@ pub enum SupportedBundlerOps {
/// Paymaster sponsor UserOp
#[serde(rename = "pm_sponsorUserOperation")]
PmSponsorUserOperation,
#[serde(rename = "pm_getPaymasterData")]
PmGetPaymasterData,
#[serde(rename = "pm_getPaymasterStubData")]
PmGetPaymasterStubData,
#[serde(rename = "pimlico_getUserOperationGasPrice")]
PimlicoGetUserOperationGasPrice,
}
Expand Down
2 changes: 2 additions & 0 deletions src/providers/pimlico.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ impl BundlerOpsProvider for PimlicoProvider {
"eth_estimateUserOperationGas".into()
}
SupportedBundlerOps::PmSponsorUserOperation => "pm_sponsorUserOperation".into(),
SupportedBundlerOps::PmGetPaymasterData => "pm_getPaymasterData".into(),
SupportedBundlerOps::PmGetPaymasterStubData => "pm_getPaymasterStubData".into(),
SupportedBundlerOps::PimlicoGetUserOperationGasPrice => {
"pimlico_getUserOperationGasPrice".into()
}
Expand Down

0 comments on commit a9bc59b

Please sign in to comment.