aztec-packages
aztec-packages copied to clipboard
bug: `mint_public` in fee juice gotta go
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.