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

Allow multiple trusted forwarders in Boson Voucher #585

Open
zajck opened this issue Mar 17, 2023 · 0 comments
Open

Allow multiple trusted forwarders in Boson Voucher #585

zajck opened this issue Mar 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@zajck
Copy link
Member

zajck commented Mar 17, 2023

BosonVoucher currently uses OZ's ERC2771ContextUpgradeable to handle metatransactions. It currently supports only 1 trusted forwarder address, which is set during the deployment.

If we want to change trusted forwarder address, currently the only way is to redeploy voucher contract with new constructor argument. Furthermore, we might want to support multiple forwarders.

ToDo:

  • change immutable trusted forwarder with storage variable (either mapping or array)
  • add methods to manage trusted forwarders (add/remove)

Since boson vouchers use beacon proxy patter, list of trusted forwarders cannot be stored in the vouchers itself (each update would require to update each cloned instance individually). Possible implementations:

  • voucher contract calls isTrustedForwarder on beacon contract
  • we deploy another forwarder between trusted forwarder and boson vouchers. Vouchers then always accept calls only from the second forwarder. And this second forwarder can accept calls from multiple trusted forwarders and implements logic to manage them.
@zajck zajck added the enhancement New feature or request label Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant