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

paymasterAddress is not required for sponsored transactions in the relay-kit #896

Closed
DaniSomoza opened this issue Jul 4, 2024 · 0 comments · Fixed by #902
Closed

paymasterAddress is not required for sponsored transactions in the relay-kit #896

DaniSomoza opened this issue Jul 4, 2024 · 0 comments · Fixed by #902

Comments

@DaniSomoza
Copy link
Contributor

Context / issue

paymasterAddress in the Relay Kit is currently required by the types. But it is not actually required if you want to use sponsored Transactions.

Proposed solution

update the relay-kit types:

export type SponsoredPaymasterOption = {
  isSponsored: true
  paymasterUrl: string
  sponsorshipPolicyId?: string
}

export type ERC20PaymasterOption = {
  isSponsored: false
  paymasterAddress: string
  paymasterTokenAddress: string
  amountToApprove?: bigint
}

export type PaymasterOptions = SponsoredPaymasterOption | ERC20PaymasterOption | undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants