-
Notifications
You must be signed in to change notification settings - Fork 271
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
refactor: final token cleanup #9864
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c7e984b
to
dcbcd38
Compare
7267578
to
63bc42a
Compare
d1b498f
to
0752c7a
Compare
b72f38b
to
1680e4f
Compare
3f31918
to
90ecd6f
Compare
b2e3360
to
1ba2129
Compare
@@ -111,6 +103,7 @@ contract Token { | |||
// docs:end:initialize_decimals | |||
} | |||
// docs:end:constructor | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was bothering me that there were no spaces between functions so I sneaked it in.
@@ -472,8 +428,7 @@ contract Token { | |||
// Transfers token `amount` from public balance of message sender to a private balance of `to`. | |||
#[private] | |||
fn transfer_to_private(to: AztecAddress, amount: Field) { | |||
// We check the minter permissions in the enqueued call as that allows us to avoid the need for `SharedMutable` | |||
// which is less efficient. | |||
// `from` is the owner of the public balance from which we'll subtract the `amount`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was incorrectly copied by me in a previous PR.
@@ -222,8 +222,7 @@ export class BlacklistTokenContractTest { | |||
this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`); | |||
expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(address)); | |||
|
|||
tokenSim.mintPrivate(amount); | |||
tokenSim.redeemShield(address, amount); | |||
tokenSim.mintPrivate(address, amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tokenSim.redeemShield was misused here and in other places as a way to increase a private balance of someone.
@@ -83,21 +83,18 @@ describe('e2e_blacklist_token_contract mint', () => { | |||
}); | |||
|
|||
describe('Mint flow', () => { | |||
it('mint_private as minter', async () => { | |||
it('mint_private as minter and redeem as recipient', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to merge these 2 tests as now it's not supported by the token simulator to have the shield flow in 2 steps.
Changes to public function bytecode sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
8b3278a
to
0b19ee1
Compare
Docs PreviewHey there! 👋 You can check your preview at https://6733c69cba91136a7aecf540--aztec-docs-dev.netlify.app |
0b19ee1
to
d14b00e
Compare
d14b00e
to
955f2e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, love it! 🙌
74ddb10
to
b8eb9ce
Compare
* master: git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg feat: mock data for IVC (#9893) refactor: final token cleanup (#9864) chore: delete accidentally added file (#9912)
In this PR I finally nuke the old shielding functionality of a token.