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

bug: mint_public in fee juice gotta go #8081

Closed
LHerskind opened this issue Aug 20, 2024 · 0 comments · Fixed by #8260
Closed

bug: mint_public in fee juice gotta go #8081

LHerskind opened this issue Aug 20, 2024 · 0 comments · Fixed by #8260
Assignees

Comments

@LHerskind
Copy link
Contributor

Currently the fee juice contract got a mint_public function as such:

 // TODO(@just-mitch): remove this function before mainnet deployment
// convenience function for testing
// the true canonical Fee Juice contract will not have this function
#[aztec(public)]
fn mint_public(to: AztecAddress, amount: Field) {
    let amount = U128::from_integer(amount);
    let new_balance = storage.balances.at(to).read().add(amount);

    storage.balances.at(to).write(new_balance);
}

It gotta go. If people are using it in the devnet to fund an account, they will at some point run into a case where they are spending funds on L2, that is unbacked on L1. This becomes an issue when the sequencer is to be paid, as it will cause an underflow and just cause publishing the rollup to not be possible, until it is properly backed. If it is matched with a mint on L1 it is good, but think it might be better if we just do it properly instead and actually bridge funds.

@github-project-automation github-project-automation bot moved this to Todo in A3 Aug 20, 2024
@sklppy88 sklppy88 self-assigned this Aug 27, 2024
@sklppy88 sklppy88 linked a pull request Aug 29, 2024 that will close this issue
sklppy88 added a commit that referenced this issue Aug 30, 2024
Addresses #8081 

One thing that I was wondering, will this new introduction of bridging
here add too much overhead in the tests ?
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Aug 30, 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.

2 participants