11import { ExampleMigrationAppV1Contract } from "./artifacts/ExampleMigrationAppV1.js" ;
22import { ExampleMigrationAppV2Contract } from "./artifacts/ExampleMigrationAppV2.js" ;
33import { Fr } from "@aztec/foundation/curves/bn254" ;
4- import { signMigrationModeA } from "../ts/ aztec-state-migration/index.js " ;
4+ import { signMigrationModeA } from "aztec-state-migration/mode-a " ;
55import { deploy } from "./deploy.js" ;
66import {
77 deployAppPair ,
@@ -106,12 +106,11 @@ async function main() {
106106 // Step 5: Bridge archive root
107107 // ============================================================
108108 console . log ( "Step 5. Bridging archive root..." ) ;
109- const { l1Result , provenBlockNumber, blockHeader } = await bridgeBlock (
109+ const { provenBlockNumber, blockHeader } = await bridgeBlock (
110110 env ,
111111 newArchiveRegistry ,
112112 ) ;
113- console . log ( ` Proven block: ${ l1Result . provenBlockNumber } ` ) ;
114- console . log ( ` Archive root: ${ l1Result . provenArchiveRoot } \n` ) ;
113+ console . log ( ` Proven block: ${ provenBlockNumber } ` ) ;
115114
116115 // ============================================================
117116 // Steps 6-7: Prepare migration args and call migrate on NEW rollup
@@ -129,11 +128,12 @@ async function main() {
129128 `Expected exactly 1 migration note, but found ${ lockNotesAndData . length } ` ,
130129 ) ;
131130 }
131+ const lockNoteAndData = lockNotesAndData [ 0 ] ;
132132
133133 // Build proofs via wallet, combining note proofs with event data
134- const [ migrationNoteProof ] = await oldUserWallet . buildMigrationNoteProofs (
134+ const migrationNoteProof = await oldUserWallet . buildMigrationNoteProof (
135135 provenBlockNumber ,
136- lockNotesAndData ,
136+ lockNoteAndData ,
137137 ) ;
138138
139139 // Sign via standalone function
@@ -248,12 +248,10 @@ async function main() {
248248 console . log ( "Step 10. Bridging archive root for public lock note..." ) ;
249249
250250 const {
251- l1Result : l1ResultPublic ,
252251 provenBlockNumber : publicProvenBlockNumber ,
253252 blockHeader : publicBlockHeader ,
254253 } = await bridgeBlock ( env , newArchiveRegistry ) ;
255- console . log ( ` Proven block: ${ l1ResultPublic . provenBlockNumber } ` ) ;
256- console . log ( ` Archive root: ${ l1ResultPublic . provenArchiveRoot } \n` ) ;
254+ console . log ( ` Proven block: ${ publicProvenBlockNumber } ` ) ;
257255
258256 // ============================================================
259257 // Step 11: Get public lock note and merkle proofs
@@ -287,12 +285,12 @@ async function main() {
287285 `Expected exactly 1 migration note for the public lock, but found ${ filteredNotes . length } ` ,
288286 ) ;
289287 }
288+ const migrationNote = filteredNotes [ 0 ] ;
290289
291- const [ publicMigrationNoteProof ] =
292- await oldUserWallet . buildMigrationNoteProofs (
293- publicProvenBlockNumber ,
294- filteredNotes ,
295- ) ;
290+ const publicMigrationNoteProof = await oldUserWallet . buildMigrationNoteProof (
291+ publicProvenBlockNumber ,
292+ migrationNote ,
293+ ) ;
296294
297295 // Sign via standalone function
298296 const publicSignature = await signMigrationModeA (
0 commit comments