refactor: TestWallet API cleanup pt. 1#17283
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| - `--sponsored-fpc`: Populate genesis state with a testing sponsored FPC contract | ||
| - `--accelerated-test-deployments`: Fire and forget deployment transactions, use in testing only (default: false) | ||
|
|
||
| ### deploy-l1-verifier |
There was a problem hiding this comment.
This command doesn't exist on the cli.
| - `--public-deploy`: Publishes the account contract instance (and the class, if needed). Needed if the contract contains public functions. | ||
| - `-p, --public-key <string>`: Public key that identifies a private signing key stored outside of the wallet. Used for ECDSA SSH accounts over the secp256r1 curve. | ||
| - `-n, --node-url <string>`: URL of the PXE (default: "http://host.docker.internal:8080") | ||
| - `-n, --node-url <string>`: URL of Aztec Node (default: "http://host.docker.internal:8080") |
There was a problem hiding this comment.
Forgot to update in the last PR. These references seems like a pretty bad thing to have given that aztec --help is available and there it will not become stale.
| */ | ||
| public async register(): Promise<AccountWithSecretKey> { | ||
| await this.pxe.registerContract({ | ||
| await this.wallet.registerContract({ |
There was a problem hiding this comment.
Random change when I was investigating what is remaining from allowing me to drop the ugly getPxe method on test wallet. That function can be dropped once we allow Wallet.registerContract to accept secretKey and partialAddress on the input.
| const receipt = await aztecNode.getTxReceipt(txHash); | ||
| return receipt.status; | ||
| } else { | ||
| await inspectTx(wallet, aztecNode, txHash, log, { includeBlockInfo: true }); |
There was a problem hiding this comment.
Just did a minor cleanup of this func.
| * When this flag is true, simulateTx constructs a request using a fake account (and accepts contract overrides | ||
| * on the input) and the PXE emulates kernel effects without generating kernel witnesses. When false, simulateTx | ||
| * defers to the standard simulation path. | ||
| */ |
There was a problem hiding this comment.
Docs based on comment Grego sent on slack.
Grego pls check it's no ambiguous.
There was a problem hiding this comment.
The gas estimations not being accurate is not a given, I wouldn't say that in the comment. We aim for them to be accurate and usable, and for now they are
5d56948 to
ad7f32e
Compare
| const [secret, messageLeafIndex] = await bridgeL1FeeJuice( | ||
| amount, | ||
| recipient, | ||
| wallet, |
There was a problem hiding this comment.
Wallet no longer needs to be passed in as we can just obtain all the necessary info from node.
| executionPayload: ExecutionPayload, | ||
| opts: SimulateMethodOptions, | ||
| ): Promise<TxSimulationResult> { | ||
| // In simulated-simulation mode we emulate kernel logic in TS. This is fast but can skew gas, |
There was a problem hiding this comment.
I just dropped this from my current PR, comment is unnecessary
ad7f32e to
3413e33
Compare
Followup work of #17228 In this PR I drop `getPXEInfo` and `getContracts` from `TestWallet` + add random docs improvements. `getPXEInfo` was just a tech debt as it was only used to check if node has the same protocol contract addresses which is quite non-sensical because those addresses are no literally 1, 2, 3, 4, 5... I assume this check is there from time when they didn't have these hardcoded addresses. `getContracts` was used just in one test and the check there was not really that important so I just dropped it.
d7dd3d0 to
94ae864
Compare
Continuation of #17283. Changes explained with comments in the code.
Continuation of #17283. Changes explained with comments in the code.
Continuation of #17283. Changes explained with comments in the code.

Followup work of #17228
In this PR I drop
getPXEInfoandgetContractsfromTestWallet+ add random docs improvements.getPXEInfowas just a tech debt as it was only used to check if node has the same protocol contract addresses which is quite non-sensical because those addresses are no literally 1, 2, 3, 4, 5... I assume this check is there from time when they didn't have these hardcoded addresses.getContractswas used just in one test and the check there was not really that important so I just dropped it.