File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2562,30 +2562,30 @@ pub fn encode_usdc_paymaster_data(
2562
2562
// - address: USDC token address
2563
2563
// - uint256: permit amount
2564
2564
// - bytes: permit signature (empty for now, needs EIP-2612 implementation)
2565
-
2565
+
2566
2566
// Mode byte (0 for permit mode)
2567
2567
data. push ( 0u8 ) ;
2568
-
2568
+
2569
2569
// Token address (USDC)
2570
2570
data. extend_from_slice ( token_address. as_slice ( ) ) ;
2571
-
2571
+
2572
2572
// Permit amount - use a reasonable amount for gas payment (10 USDC worth)
2573
2573
let permit_amount = U256 :: from ( 10_000_000u64 ) ; // 10 USDC (6 decimals)
2574
2574
data. extend_from_slice ( & permit_amount. to_be_bytes :: < 32 > ( ) ) ;
2575
-
2575
+
2576
2576
// TODO: Implement EIP-2612 permit signature
2577
2577
// For now, we'll try with an empty signature to see if that changes the error
2578
2578
// In production, this would need to be a valid permit signature allowing
2579
2579
// the paymaster to spend USDC on behalf of the TBA
2580
-
2580
+
2581
2581
// Note: The permit signature would typically be generated by signing:
2582
2582
// - owner: TBA address
2583
- // - spender: paymaster address
2583
+ // - spender: paymaster address
2584
2584
// - value: permit_amount
2585
2585
// - nonce: current permit nonce from USDC contract
2586
2586
// - deadline: future timestamp
2587
-
2587
+
2588
2588
// For testing, let's try without the signature first to see if we get a different error
2589
-
2589
+
2590
2590
data
2591
2591
}
You can’t perform that action at this time.
0 commit comments