Skip to content

Appended calldate gets lost #101

@AndyOooh

Description

@AndyOooh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions