From 3225c4ccd1dd0b3f864e604c22b2a2978b4c816b Mon Sep 17 00:00:00 2001 From: tommyrharper Date: Tue, 16 Jul 2024 19:41:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=F0=9F=8F=BB=20=F0=9F=A7=B9=20Add?= =?UTF-8?q?=20USDC=5FTO=5FSUSDC=5FDECIMALS=5FINCREASE=20constant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MarginPaymaster.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MarginPaymaster.sol b/src/MarginPaymaster.sol index 637d6ee..e8ccf40 100644 --- a/src/MarginPaymaster.sol +++ b/src/MarginPaymaster.sol @@ -39,6 +39,7 @@ contract MarginPaymaster is IPaymaster, Zap, Ownable { uint256 public constant DEFAULT_WALLET_INDEX = 0; uint256 public constant SIGNATURE_BYTES_OFFSET = 20; uint256 public constant ACCOUNT_ID_OFFSET = 85; + uint256 public constant USDC_TO_SUSDC_DECIMALS_INCREASE = 1e12; /*////////////////////////////////////////////////////////////// STATE @@ -224,7 +225,7 @@ contract MarginPaymaster is IPaymaster, Zap, Ownable { } uint256 sUSDToWithdrawFromMargin = (costOfGasInUSDC - - availableUSDCInWallet) * 1e12; + availableUSDCInWallet) * USDC_TO_SUSDC_DECIMALS_INCREASE; uint256 withdrawn = withdrawFromMargin( sender, sUSDToWithdrawFromMargin,