Skip to content

Commit 22e7e14

Browse files
committed
wip
1 parent ecee219 commit 22e7e14

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/wallet.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,7 +2579,7 @@ pub fn generate_eip2612_permit_signature<S: Signer>(
25792579
domain_data.extend_from_slice(&domain_type_hash);
25802580
domain_data.extend_from_slice(&name_hash);
25812581
domain_data.extend_from_slice(&version_hash);
2582-
domain_data.extend_from_slice(&chain_id.to_be_bytes::<32>());
2582+
domain_data.extend_from_slice(&U256::from(chain_id).to_be_bytes::<32>());
25832583
domain_data.extend_from_slice(token_address.as_slice());
25842584
let domain_separator = Keccak256::digest(&domain_data);
25852585

@@ -2631,8 +2631,15 @@ pub fn get_usdc_permit_nonce(
26312631

26322632
let token = resolve_name(token_address, provider.chain_id)?;
26332633

2634+
// Create a transaction request for the call
2635+
let tx = TransactionRequest {
2636+
to: Some(TxKind::Call(token)),
2637+
input: call_data.into(),
2638+
..Default::default()
2639+
};
2640+
26342641
// Make the call
2635-
let result = provider.call(token, call_data, None)?;
2642+
let result = provider.call(tx, None)?;
26362643

26372644
// Parse the result as U256
26382645
if result.len() >= 32 {
@@ -2648,7 +2655,7 @@ pub fn encode_usdc_paymaster_data_with_permit<S: Signer>(
26482655
paymaster: EthAddress,
26492656
token_address: EthAddress,
26502657
tba_address: EthAddress,
2651-
max_cost: U256,
2658+
_max_cost: U256,
26522659
provider: &Provider,
26532660
signer: &S,
26542661
) -> Result<Vec<u8>, WalletError> {
@@ -2709,7 +2716,7 @@ pub fn encode_usdc_paymaster_data_with_permit<S: Signer>(
27092716
pub fn encode_usdc_paymaster_data(
27102717
paymaster: EthAddress,
27112718
token_address: EthAddress,
2712-
max_cost: U256,
2719+
_max_cost: U256,
27132720
) -> Vec<u8> {
27142721
// For now, return a simplified version that we can use for testing
27152722
// The real implementation should use encode_usdc_paymaster_data_with_permit

0 commit comments

Comments
 (0)