Skip to content

[General] Cannot use 2 or more parameters in the paymaster's innerInput data #148

Closed Answered by dutterbutter
lutr0 asked this question in General
Discussion options

You must be logged in to vote

Hey @lutr0 - thanks for posting these great questions. Please keep them coming 💪

I was able to pass in two params using the following example:

const value1 = ethers.utils.hexlify(ethers.utils.toUtf8Bytes("dutterbutter"));
const value2 = ethers.utils.hexlify(ethers.utils.toUtf8Bytes("zk_dutterbutter"));

const paymasterParams = utils.getPaymasterParams(
  paymaster.address.toString(),
  {
    type: payType,
    token: token,
    minimalAllowance,
    innerInput: ethers.utils.defaultAbiCoder.encode(
      ["bytes", "bytes"],
      [ethers.utils.arrayify(value1), ethers.utils.arrayify(value2)]
  ),
  }
);

And then on the contract side:

function bytesToString(bytes memory data) internal pure…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@lutr0
Comment options

@dutterbutter
Comment options

@dutterbutter
Comment options

Answer selected by dutterbutter
@lutr0
Comment options

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
general General question aa Question related to Account Abstraction
5 participants