You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#7954
I replaced the use of `encode_and_encrypt_note` with
`encode_and_encrypt_note_with_keys` in most of the places as it allowed
for reusing the obtained keys. Note that there is only 1 legimate place
remaining where it made sense to keep on using `encode_and_encrypt_note`
and that is
[here](https://github.com/AztecProtocol/aztec-packages/blob/34ae51df5d45973deb3408075a50070c781f7a48/noir-projects/noir-contracts/contracts/app_subscription_contract/src/main.nr#L47).
All the other places are either test contracts or the token blacklist
contract which is very outdated by now and hence it didn't seem to be
worth it to update it.
Given this I think we should nuke `encode_and_encrypt_note` to keep the
API simpler and to make devs write efficient code. Does the reviewer
agree? (possibly also `encode_and_encrypt_event`)
Token::transfer(...) gates before were 49296 and after 38903. Diff of
**10393 gates**.
0 commit comments