@@ -2786,25 +2786,25 @@ pub fn create_erc20_permit_calldata(
2786
2786
// The TBA will call permit() directly as the owner
2787
2787
// This creates calldata for: permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
2788
2788
// But for TBA on-chain calls, v=0, r=0, s=0 works because the TBA IS the owner
2789
-
2789
+
2790
2790
use alloy_sol_types:: SolCall ;
2791
-
2791
+
2792
2792
// Define the permit function call
2793
2793
// Note: Using the standard ERC20Permit interface
2794
2794
sol ! {
2795
2795
function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) ;
2796
2796
}
2797
-
2797
+
2798
2798
let call = permitCall {
2799
2799
owner,
2800
2800
spender,
2801
2801
value,
2802
2802
deadline,
2803
- v : 0 , // Dummy values for on-chain call
2803
+ v : 0 , // Dummy values for on-chain call
2804
2804
r : B256 :: ZERO ,
2805
2805
s : B256 :: ZERO ,
2806
2806
} ;
2807
-
2807
+
2808
2808
call. abi_encode ( )
2809
2809
}
2810
2810
@@ -2826,14 +2826,14 @@ pub fn create_multicall_permit_and_execute(
2826
2826
permit_amount,
2827
2827
permit_deadline,
2828
2828
) ;
2829
-
2829
+
2830
2830
// For TBA execute, we need to create two execute calls:
2831
2831
// 1. Execute permit on token contract
2832
2832
// 2. Execute the actual operation
2833
-
2833
+
2834
2834
// This would need to be wrapped in a multicall or batch execute
2835
2835
// The exact implementation depends on the TBA's interface
2836
-
2836
+
2837
2837
// For now, return just the permit calldata
2838
2838
// In practice, this would be combined with the execute calldata
2839
2839
permit_calldata
@@ -2852,7 +2852,7 @@ pub fn encode_usdc_paymaster_data_for_tba(
2852
2852
2853
2853
// Add paymaster-specific data for Circle's TokenPaymaster v0.8
2854
2854
// For TBAs, we might need a different mode or the paymaster needs to support on-chain permits
2855
-
2855
+
2856
2856
// Mode byte (1 for on-chain approval mode, if supported)
2857
2857
// Note: This depends on Circle's paymaster implementation
2858
2858
// Mode 0 = permit signature mode (for EOAs)
@@ -2866,6 +2866,6 @@ pub fn encode_usdc_paymaster_data_for_tba(
2866
2866
data. extend_from_slice ( & max_cost. to_be_bytes :: < 32 > ( ) ) ;
2867
2867
2868
2868
// No signature needed for on-chain approval mode
2869
-
2869
+
2870
2870
data
2871
2871
}
0 commit comments