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
Allows ALL methods in the wallet to be batched (because why not). Initially I was going for allowing them on a case-by-case basis, but integrating the Wallet SDK has made apparent apps can have many interaction flows and this extra flexibility is nice.
Updated the migration notes and in the process realized I missed exporting some artifacts in #19457, so here they are (protocol contract wrappers)
Co-authored-by: thunkar <[email protected]>
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/resources/migration_notes.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,85 @@ Aztec is in full-speed development. Literally every version breaks compatibility
9
9
10
10
## TBD
11
11
12
+
### [Aztec.js] Wallet batching now supports all methods
13
+
14
+
The `BatchedMethod` type is now a discriminated union that ensures type safety: the `args` must match the specific method `name`. This prevents runtime errors from mismatched arguments.
### [Aztec.js] Refactored `getContractMetadata` and `getContractClassMetadata` in Wallet
33
+
34
+
The contract metadata methods in the `Wallet` interface have been refactored to provide more granular information and avoid expensive round-trips.
35
+
36
+
**`ContractMetadata`:**
37
+
38
+
```diff
39
+
{
40
+
- contractInstance?: ContractInstanceWithAddress,
41
+
+ instance?: ContractInstanceWithAddress; // Instance registered in the Wallet, if any
42
+
isContractInitialized: boolean; // Is the init nullifier onchain? (already there)
43
+
isContractPublished: boolean; // Has the contract been published? (already there)
44
+
+ isContractUpdated: boolean; // Has the contract been updated?
45
+
+ updatedContractClassId?: Fr; // If updated, the new class ID
46
+
}
47
+
```
48
+
49
+
**`ContractClassMetadata`:**
50
+
51
+
This method loses the ability to request the contract artifact via the `includeArtifact` flag
52
+
53
+
```diff
54
+
{
55
+
- contractClass?: ContractClassWithId;
56
+
- artifact?: ContractArtifact;
57
+
isContractClassPubliclyRegistered: boolean; // Is the class registered onchain?
58
+
+ isArtifactRegistered: boolean; // Does the Wallet know about this artifact?
59
+
}
60
+
```
61
+
62
+
- Removes expensive artifact/class transfers between wallet and app
63
+
- Separates PXE storage info (`instance`, `isArtifactRegistered`) from public chain info (`isContractPublished`, `isContractClassPubliclyRegistered`)
64
+
- Makes it easier to determine if actions like `registerContract` are needed
65
+
66
+
### [Aztec.js] Removed `UnsafeContract` and protocol contract helper functions
67
+
68
+
The `UnsafeContract` class and async helper functions (`getFeeJuice`, `getClassRegistryContract`, `getInstanceRegistryContract`) have been removed. Protocol contracts are now accessed via auto-generated type-safe wrappers with only the ABI (no bytecode). Since PXE always has protocol contract artifacts available, importing and using these contracts from `aztec.js` is very lightweight and follows the same pattern as regular user contracts.
69
+
70
+
**Migration:**
71
+
72
+
```diff
73
+
- import { getFeeJuice, getClassRegistryContract, getInstanceRegistryContract } from '@aztec/aztec.js/contracts';
74
+
+ import { FeeJuiceContract, ContractClassRegistryContract, ContractInstanceRegistryContract } from '@aztec/aztec.js/protocol';
**Note:** The higher-level utilities like `publishInstance`, `publishContractClass`, and `broadcastPrivateFunction` from `@aztec/aztec.js/deployment` are still available and unchanged. These utilities use the new wrappers internally.
90
+
12
91
### [Aztec.nr] Renamed Router contract
13
92
14
93
`Router` contract has been renamed as `PublicChecks` contract.
0 commit comments