-
Notifications
You must be signed in to change notification settings - Fork 266
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: remove native token #2280
Conversation
92352e9
to
1f4246d
Compare
d8ca053
to
464f39b
Compare
ebf32b9
to
2b379f7
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.
Not fully sure what the errors are around unencrypted logs but it would be good to have an attached issue describing, other than that lgtm
const secretHash = await computeMessageSecretHash(secret); | ||
expect((await token.methods.mint_private(20n, secretHash).send().wait()).status).toEqual(TxStatus.MINED); | ||
expect( | ||
(await token.methods.redeem_shield({ address: recipient.getAddress() }, 20n, secret).send().wait()).status, |
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.
could use the helper from the previous pr here?
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.
The waitForSuccess
? Was not used here due to this being more referred to in the docs so seemed annoying if you see it in docs and it is not an inbuilt function 🤷
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.
Ah i see good enough reason!
expect( | ||
(await token.methods.redeem_shield({ address: recipient.getAddress() }, 20n, secret).send().wait()).status, | ||
).toEqual(TxStatus.MINED); | ||
expect(await token.methods.balance_of_private({ address: recipient.getAddress() }).view()).toEqual(20n); |
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.
As this is being used in the example we should probably limit the level of chaining in the calls
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.
Ye, just wasted a lot of space otherwise, but maybe fine to include the waitForSuccess
or just do the wait and ignore the status as we are doing in quite a few places anyway 🤷
expect(toBigIntBE(balance!)).toEqual(100n); | ||
// docs:end:public-storage | ||
}); | ||
|
||
it('checks unencrypted logs', async () => { | ||
it('checks unencrypted logs, [Kinda broken with current implementation]', 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.
issue to fix?
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.
Created #2306 for it, will update
|
||
beforeAll(async () => { | ||
// docs:start:in-proc-sandbox | ||
({ rpcServer: rpc, stop } = await createSandbox()); | ||
// docs:end:in-proc-sandbox | ||
owner = await createAccount(rpc); | ||
recipient = await createAccount(rpc); | ||
token = await PrivateTokenContract.deploy(owner, 100n, owner.getAddress()).send().deployed(); | ||
token = await TokenContract.deploy(owner).send().deployed(); | ||
expect((await token.methods._initialize({ address: owner.getAddress() }).send().wait()).status).toEqual( |
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.
style nit - I prefer the old school method where:
const tx = await token.methods._initialize({ address: owner.getAddress() }).send()
const receipt = tx.wait
expect(....)
Since this is a guide, might be good to reduce chaining
2b379f7
to
e284b94
Compare
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-packages: 0.7.4</summary> ## [0.7.4](aztec-packages-v0.7.3...aztec-packages-v0.7.4) (2023-09-15) ### Features * Elliptic Curve Virtual Machine Circuit ([#1268](#1268)) ([f85ecd9](f85ecd9)) * Exposing nargo version via `NodeInfo` ([#2333](#2333)) ([1c2669c](1c2669c)), closes [#2332](#2332) * Migrate accounts to auth witness ([#2281](#2281)) ([91152af](91152af)), closes [#2043](#2043) ### Bug Fixes * Aztec-nr mirror url ([#2321](#2321)) ([aaf7f67](aaf7f67)) * **build:** Fixed paths on s3 deployments ([#2335](#2335)) ([38c7979](38c7979)) ### Miscellaneous * Do not format boxes with global format ([#2326](#2326)) ([2fe845f](2fe845f)) * Remove native token ([#2280](#2280)) ([4032d01](4032d01)) * Rename getAccounts to getRegisteredAccounts ([#2330](#2330)) ([c7f3776](c7f3776)) </details> <details><summary>barretenberg.js: 0.7.4</summary> ## [0.7.4](barretenberg.js-v0.7.3...barretenberg.js-v0.7.4) (2023-09-15) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>barretenberg: 0.7.4</summary> ## [0.7.4](barretenberg-v0.7.3...barretenberg-v0.7.4) (2023-09-15) ### Features * Elliptic Curve Virtual Machine Circuit ([#1268](#1268)) ([f85ecd9](f85ecd9)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Fixes #2277.
Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.