Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipp Makarov authored and Filipp Makarov committed Oct 22, 2024
1 parent 98a646e commit 85d1340
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions contracts/sponsorship/BiconomySponsorshipPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ contract BiconomySponsorshipPaymaster is
// Include unaccountedGas since EP doesn't include this in actualGasCost
// unaccountedGas = postOpGas + EP overhead gas + estimated penalty
actualGasCost = actualGasCost + (unaccountedGas * actualUserOpFeePerGas);
console2.log("gas at pm.postOp sent by EP + unaccountedGas ", actualGasCost);
console2.log("actual unaccountedGas (postOp overload) units at pm.postOp ", unaccountedGas);
// Apply the price markup
uint256 adjustedGasCost = (actualGasCost * priceMarkup) / _PRICE_DENOMINATOR;

Expand Down
8 changes: 4 additions & 4 deletions test/unit/concrete/TestSponsorshipPaymaster.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract TestSponsorshipPaymasterWithPriceMarkup is TestBase {
entryPointArg: ENTRYPOINT,
verifyingSignerArg: PAYMASTER_SIGNER.addr,
feeCollectorArg: PAYMASTER_FEE_COLLECTOR.addr,
unaccountedGasArg: 7e3,
unaccountedGasArg: 15e3, //if set too low, PM will lose money
paymasterIdWithdrawalDelayArg: WITHDRAWAL_DELAY,
minDepositArg: MIN_DEPOSIT
});
Expand Down Expand Up @@ -265,10 +265,10 @@ contract TestSponsorshipPaymasterWithPriceMarkup is TestBase {
IStakeManager.DepositInfo memory depositInfo = ENTRYPOINT.getDepositInfo(address(bicoPaymaster));
uint256 PAYMASTER_POSTOP_GAS_OFFSET = 36;
uint256 PAYMASTER_DATA_OFFSET = 52;
console2.log("deposit in EP ", depositInfo.deposit);
console2.log("payId Bal Aft ", dappPaymasterBalanceAfter);
// console2.log("deposit in EP ", depositInfo.deposit);
// console2.log("payId Bal Aft ", dappPaymasterBalanceAfter);
console2.log("max gas fee ", uint128(uint256(userOp.gasFees)));
console2.log("max gas ", this.getGasLimit(userOp));
//console2.log("max gas ", this.getGasLimit(userOp));

vm.warp(block.timestamp + WITHDRAWAL_DELAY + 1);
bicoPaymaster.executeWithdrawalRequest(DAPP_ACCOUNT.addr);
Expand Down

0 comments on commit 85d1340

Please sign in to comment.