Skip to content

Commit 921684b

Browse files
Format Rust code using rustfmt
1 parent 041c7be commit 921684b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/wallet.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,25 +2786,25 @@ pub fn create_erc20_permit_calldata(
27862786
// The TBA will call permit() directly as the owner
27872787
// This creates calldata for: permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
27882788
// But for TBA on-chain calls, v=0, r=0, s=0 works because the TBA IS the owner
2789-
2789+
27902790
use alloy_sol_types::SolCall;
2791-
2791+
27922792
// Define the permit function call
27932793
// Note: Using the standard ERC20Permit interface
27942794
sol! {
27952795
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s);
27962796
}
2797-
2797+
27982798
let call = permitCall {
27992799
owner,
28002800
spender,
28012801
value,
28022802
deadline,
2803-
v: 0, // Dummy values for on-chain call
2803+
v: 0, // Dummy values for on-chain call
28042804
r: B256::ZERO,
28052805
s: B256::ZERO,
28062806
};
2807-
2807+
28082808
call.abi_encode()
28092809
}
28102810

@@ -2826,14 +2826,14 @@ pub fn create_multicall_permit_and_execute(
28262826
permit_amount,
28272827
permit_deadline,
28282828
);
2829-
2829+
28302830
// For TBA execute, we need to create two execute calls:
28312831
// 1. Execute permit on token contract
28322832
// 2. Execute the actual operation
2833-
2833+
28342834
// This would need to be wrapped in a multicall or batch execute
28352835
// The exact implementation depends on the TBA's interface
2836-
2836+
28372837
// For now, return just the permit calldata
28382838
// In practice, this would be combined with the execute calldata
28392839
permit_calldata
@@ -2852,7 +2852,7 @@ pub fn encode_usdc_paymaster_data_for_tba(
28522852

28532853
// Add paymaster-specific data for Circle's TokenPaymaster v0.8
28542854
// For TBAs, we might need a different mode or the paymaster needs to support on-chain permits
2855-
2855+
28562856
// Mode byte (1 for on-chain approval mode, if supported)
28572857
// Note: This depends on Circle's paymaster implementation
28582858
// Mode 0 = permit signature mode (for EOAs)
@@ -2866,6 +2866,6 @@ pub fn encode_usdc_paymaster_data_for_tba(
28662866
data.extend_from_slice(&max_cost.to_be_bytes::<32>());
28672867

28682868
// No signature needed for on-chain approval mode
2869-
2869+
28702870
data
28712871
}

0 commit comments

Comments
 (0)