Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appended calldate gets lost #101

Open
AndyOooh opened this issue Dec 22, 2024 · 1 comment
Open

Appended calldate gets lost #101

AndyOooh opened this issue Dec 22, 2024 · 1 comment

Comments

@AndyOooh
Copy link

Hi,

I am trying to append an identifier to calls to a SC.
This works for EAOs but with CB smart wallet the appended hex gets lost somehow.

If I understand correctly, the flow is this:
Frontend(batched ERC20 approve and our SC function call with appended Hex) --> bundler --> entry point --> our SC.

I have decoded calldata on every step but don't see the the appended data. I would expect to see it on the calldata to the 'target' SC as I do when using EOA.
The tx is successful, just without the appended data.

On the frontend I do something like:

// Using Viem and wagmi:

const contractCalls = () => {
  const paymentContractParams = {
    chainId,
    address: routerAddress,
    abi: routerAbi,
    functionName,
    args,
    value,
    dataSuffix: payload.dataSuffix || '0x',
  };

  const approveContractParams = {
    address: tokenAddress,
    abi: tokenAbi,
    functionName: 'approve',
    args: [routerAddress, tokenValue],
  };
  return [paymentContractParams, approveContractParams];
};

const { writeContractsAsync } = useWriteContracts();

const result = await writeContractsAsync?.({
  contracts: contractCalls,
  capabilities,
});

Could it be that the bundler or entry point strips away the appended data?

Has this been tested before?

This tx (SCA) on Base chain:
https://basescan.org/tx/0xa296390756c2fe38575b0d0d321a71d32931ae164eb2ced79c3225e590cdee84
Should have 1dc0de004d appended to the yodlWithAcross call.

Just like this one (EOA) has:
https://basescan.org/tx/0x8a86dfc90044f5b9ea7c91d540ff04716341e7c7296101eb4f063c1012d9d5ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants
@AndyOooh and others