Skip to content

[SDK] Error while setting custom paymaster data with Go-SDK #811

Answered by dutterbutter
hoshiyari420 asked this question in SDKs
Discussion options

You must be logged in to vote

Update:

I’ve created a min-example repo to assist with debugging against a running fork of Sepolia using anvil-zksync. I added some console logs to get more details during the Paymaster's validateAndPayForPaymasterTransaction function, where the issue seems to occur.

Findings:

It seems that the Paymaster input differs between the Go test and the JS test when interacting with the contract. Specifically, during the Go test, the Paymaster contract fails while decoding this line:

(address token, uint256 amount, bytes memory data) = abi.decode(
    _transaction.paymasterInput[4:],
    (address, uint256, bytes)
);

Observed Differences:

_transaction.paymasterInput[4:] differs as shown below:

JS …

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hoshiyari420
Comment options

Comment options

You must be logged in to vote
7 replies
@hoshiyari420
Comment options

@dutterbutter
Comment options

@trsmarc
Comment options

@dutterbutter
Comment options

Answer selected by hoshiyari420
@hoshiyari420
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
SDKs
Labels
sdk Questions for the SDKs
4 participants