Skip to content

Commit 5b272ac

Browse files
committed
fix(wallets): pass contracts via options bag to SimulationOverrides
EmbeddedWallet was still calling the old positional-argument form of the SimulationOverrides constructor, so contract-instance overrides for the stub account were silently dropped, and simulation re-entered the real account entrypoint with no auth witness.
1 parent a0c06e9 commit 5b272ac

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/docs-developers/docs/resources/migration_notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ const result = await contract.methods.read_balance(account).simulate({
158158

159159
The same option flows through `wallet.simulateTx` and eventually to `simulatePublicCalls` RPC on `AztecNode`.
160160

161+
Direct callers of the `SimulationOverrides` constructor must switch from a positional `contracts` argument to an options bag:
162+
163+
```diff
164+
- new SimulationOverrides(contracts);
165+
+ new SimulationOverrides({ contracts });
166+
```
167+
161168
### [PXE] `proveTx` takes an options bag
162169

163170
`PXE.proveTx` used to accept `scopes` as a positional argument; it now takes an options bag consistent with `simulateTx` and `profileTx`, and adds an optional `senderForTags` field. Update direct callers:

yarn-project/wallets/src/embedded/embedded_wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export class EmbeddedWallet extends BaseWallet {
264264
const chainInfo = await this.getChainInfo();
265265

266266
const accountOverrides = await this.buildAccountOverrides(scopes);
267-
const overrides = new SimulationOverrides(accountOverrides);
267+
const overrides = new SimulationOverrides({ contracts: accountOverrides });
268268

269269
let txRequest: TxExecutionRequest;
270270
if (from === NO_FROM) {

0 commit comments

Comments
 (0)