@@ -24,6 +24,7 @@ import { getContract } from 'viem';
2424
2525import { L1_DIRECT_WRITE_ACCOUNT_INDEX , MNEMONIC , getPaddedMaxFeesPerGas } from '../../fixtures/fixtures.js' ;
2626import { type SetupOptions , ensureAuthRegistryPublished , setup } from '../../fixtures/setup.js' ;
27+ import { testSpan } from '../../fixtures/timing.js' ;
2728import { mintTokensToPrivate } from '../../fixtures/token_utils.js' ;
2829import { type BalancesFn , getBalancesFn , setupSponsoredFPC } from '../../fixtures/utils.js' ;
2930import {
@@ -158,7 +159,9 @@ export class FeesTest extends SingleNodeTestContext {
158159 async mintAndBridgeFeeJuice ( minter : AztecAddress , recipient : AztecAddress ) {
159160 const claim = await this . feeJuiceBridgeTestHarness . prepareTokensOnL1 ( recipient ) ;
160161 const { claimSecret : secret , messageLeafIndex : index } = claim ;
161- await this . feeJuiceContract . methods . claim ( recipient , claim . claimAmount , secret , index ) . send ( { from : minter } ) ;
162+ await testSpan ( 'setup:bridge' , ( ) =>
163+ this . feeJuiceContract . methods . claim ( recipient , claim . claimAmount , secret , index ) . send ( { from : minter } ) ,
164+ ) ;
162165 }
163166
164167 /** Alice mints bananaCoin tokens privately to the target address and redeems them. */
@@ -167,7 +170,7 @@ export class FeesTest extends SingleNodeTestContext {
167170 . balance_of_private ( address )
168171 . simulate ( { from : address } ) ;
169172
170- await mintTokensToPrivate ( this . bananaCoin , this . aliceAddress , address , amount ) ;
173+ await testSpan ( 'tx:mint' , ( ) => mintTokensToPrivate ( this . bananaCoin , this . aliceAddress , address , amount ) ) ;
171174
172175 const { result : balanceAfter } = await this . bananaCoin . methods
173176 . balance_of_private ( address )
@@ -236,9 +239,11 @@ export class FeesTest extends SingleNodeTestContext {
236239 async applyDeployBananaToken ( ) {
237240 this . logger . info ( 'Applying deploy banana token setup' ) ;
238241
239- const { contract : bananaCoin } = await BananaCoin . deploy ( this . wallet , this . aliceAddress , 'BC' , 'BC' , 18n ) . send ( {
240- from : this . aliceAddress ,
241- } ) ;
242+ const { contract : bananaCoin } = await testSpan ( 'deploy:token' , ( ) =>
243+ BananaCoin . deploy ( this . wallet , this . aliceAddress , 'BC' , 'BC' , 18n ) . send ( {
244+ from : this . aliceAddress ,
245+ } ) ,
246+ ) ;
242247 this . logger . info ( `BananaCoin deployed at ${ bananaCoin . address } ` ) ;
243248
244249 this . bananaCoin = bananaCoin ;
@@ -257,12 +262,15 @@ export class FeesTest extends SingleNodeTestContext {
257262 expect ( ( await this . wallet . getContractMetadata ( feeJuiceContract . address ) ) . isContractPublished ) . toBe ( true ) ;
258263
259264 const bananaCoin = this . bananaCoin ;
260- const { contract : bananaFPC } = await FPCContract . deploy ( this . wallet , bananaCoin . address , this . fpcAdmin ) . send ( {
261- from : this . aliceAddress ,
262- } ) ;
265+ const { contract : bananaFPC } = await testSpan ( 'deploy:fpc' , ( ) =>
266+ FPCContract . deploy ( this . wallet , bananaCoin . address , this . fpcAdmin ) . send ( {
267+ from : this . aliceAddress ,
268+ } ) ,
269+ ) ;
263270
264271 this . logger . info ( `BananaPay deployed at ${ bananaFPC . address } ` ) ;
265272
273+ // bridgeFromL1ToL2 carries its own setup:bridge span.
266274 await this . feeJuiceBridgeTestHarness . bridgeFromL1ToL2 ( bananaFPC . address , this . aliceAddress ) ;
267275
268276 this . bananaFPC = bananaFPC ;
@@ -345,9 +353,11 @@ export class FeesTest extends SingleNodeTestContext {
345353 this . logger . info ( 'Applying fund Alice with bananas setup' ) ;
346354
347355 await this . mintPrivateBananas ( this . ALICE_INITIAL_BANANAS , this . aliceAddress ) ;
348- await this . bananaCoin . methods
349- . mint_to_public ( this . aliceAddress , this . ALICE_INITIAL_BANANAS )
350- . send ( { from : this . aliceAddress } ) ;
356+ await testSpan ( 'tx:mint' , ( ) =>
357+ this . bananaCoin . methods . mint_to_public ( this . aliceAddress , this . ALICE_INITIAL_BANANAS ) . send ( {
358+ from : this . aliceAddress ,
359+ } ) ,
360+ ) ;
351361 }
352362
353363 public async applyFundAliceWithPrivateBananas ( ) {
0 commit comments