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

Pay fees via FPC publicly during account contract initialization #5544

Closed
Tracked by #4998
alexghr opened this issue Apr 3, 2024 · 0 comments · Fixed by #5601
Closed
Tracked by #4998

Pay fees via FPC publicly during account contract initialization #5544

alexghr opened this issue Apr 3, 2024 · 0 comments · Fixed by #5601
Assignees

Comments

@alexghr
Copy link
Contributor

alexghr commented Apr 3, 2024

No description provided.

@github-project-automation github-project-automation bot moved this to Todo in A3 Apr 3, 2024
@alexghr alexghr linked a pull request Apr 9, 2024 that will close this issue
@alexghr alexghr self-assigned this Apr 9, 2024
alexghr added a commit that referenced this issue Apr 10, 2024
This PR enables accounts to pay tx fees when they're deployed. To
achieve this a new deployment method was added that's used by the
`AccountManager` class to optionally register/publicly deploy and
initialize the target account contract.

Entrypoint classes now accept authwits/packed arguments alongside the
normal function calls from before. This is needed so that authwits could
be created in a parent context and then passed along as transient
authwits to the transaction (see `ExecutionRequestInit` wrapper type)

Initializing an account contract can use any of the three existing
payment methods:
- using bridged gas token from L1
- paying privately through a fee payment contract
- paying publicly through a fee payment contract

In order to use fee payment contracts this PR adds `noinitcheck` to
`spend_private_authwit` and `spend_public_authwit` because it's not
possible to read the init nullifier in the current tx (protocol
limitation). Instead the contract relies on the note containing the
public key to exist to validate that the contract has been initialized
correctly.

An extra payment flow is tested as well: a third party takes the
account's public keys and deploys and initializes the account while
paying the associated fee. This simulates the flow where a deployment
service is used that takes payment through a side chain (e.g. fiat).

Breaking change: moved `DefaultMultiCallEntrypoint` to aztec.js

This PR supersedes #5540 and #5543.

Fix #5190 #5191 #5544.
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant