test: e2e tests tokenized vault - authwits - #152
Conversation
…-wonderland/aztec-standards into feat/tokenized-vault-redeem-tests
…ized-vault-withdraw-tests
…-wonderland/aztec-standards into feat/tokenized-vault-redeem-tests
…vault-exact-tests
…ct-tests Signed-off-by: ilpepepig <167773062+ilpepepig@users.noreply.github.com>
…erland/aztec-standards into test/e2e-tests-tokenized-vault
This comment was marked as outdated.
This comment was marked as outdated.
…dards into test/e2e-tests-tokenized-vault
…enized-vault-authwits
This comment was marked as outdated.
This comment was marked as outdated.
…c-standards into test/e2e-tests-tokenized-vault-authwits
…defi-wonderland/aztec-standards into test/e2e-tests-tokenized-vault-authwits
| depositAction.with({ authWitnesses: [depositAuthWitness] }), | ||
| alice, | ||
| assetsAlice, | ||
| ); |
There was a problem hiding this comment.
Bug: Vault Authorization Overwrite Bug
The callVaultWithPrivateAuthWit function incorrectly overwrites existing authWitnesses on Aztec.js method calls. It replaces any pre-set authWitnesses (e.g., for deposit or issue operations) with only [transferAuthWitness], causing the original authorization to be lost and the vault operation to fail. A similar, inconsistent pattern exists in callVaultWithPublicAuthWit.
Locations (6)
| publicDepositAction.with({ authWitnesses: [publicDepositAuthWitness] }), | ||
| bob, | ||
| assetsBob, | ||
| ); |
There was a problem hiding this comment.
Bug: Incorrect Authwit Handling Causes Test Failures
A private authorization witness (authwit), generated by setPrivateAuthWit, is incorrectly passed to callVaultWithPublicAuthWit. This helper function is designed for public authwits and will ignore the private one, causing authorization failures in test cases involving private shares, such as deposit_public_to_private, issue_public_to_private, and deposit_public_to_private_exact.
Locations (3)
There was a problem hiding this comment.
Yes. Not the greatest variable name though.
This comment was marked as outdated.
This comment was marked as outdated.
…dards into test/e2e-tests-tokenized-vault-authwits
Benchmark ComparisonContract: nft
Contract: token
Contract: tokenized_vault
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| publicDepositAction.with({ authWitnesses: [publicDepositAuthWitness] }), | ||
| bob, | ||
| assetsBob, | ||
| ); |
🤖 Linear
Closes AZT-255
Description
Check parent linear issue for more context https://linear.app/defi-wonderland/issue/AZT-184/typescript-testing-suite
Note that the new tests are the ones inside
describe('Successful interactions with authwits.'.