diff --git a/yarn-project/end-to-end/src/integration_archiver_l1_to_l2.test.ts b/yarn-project/end-to-end/src/integration_archiver_l1_to_l2.test.ts index 538939c5666a..591d528c72f9 100644 --- a/yarn-project/end-to-end/src/integration_archiver_l1_to_l2.test.ts +++ b/yarn-project/end-to-end/src/integration_archiver_l1_to_l2.test.ts @@ -30,7 +30,7 @@ describe('archiver integration with l1 to l2 messages', () => { let owner: AztecAddress; let receiver: AztecAddress; - beforeEach(async () => { + beforeAll(async () => { let deployL1ContractsValues: DeployL1Contracts | undefined; let accounts: CompleteAddress[]; ({ teardown, wallet, deployL1ContractsValues, accounts, config, logger } = await setup(2)); @@ -59,10 +59,10 @@ describe('archiver integration with l1 to l2 messages', () => { logger('Successfully deployed contracts and initialized portal'); }, 100_000); - afterEach(async () => { + afterAll(async () => { await archiver.stop(); - await teardown(); - }, 30_000); + await teardown() + }); it('cancelled l1 to l2 messages cannot be consumed by archiver', async () => { // create a message, then cancel it @@ -109,7 +109,7 @@ describe('archiver integration with l1 to l2 messages', () => { it('archiver handles l1 to l2 message correctly even when l2block has no such messages', async () => { // send a transfer tx to force through rollup with the message included - l2Token.methods.transfer_public(owner, receiver, 0n, 0n).send(); + await l2Token.methods.transfer_public(owner, receiver, 0n, 0n).send().wait(); expect((await archiver.getPendingL1ToL2Messages(10)).length).toEqual(0); expect(() => archiver.getConfirmedL1ToL2Message(Fr.ZERO)).toThrow(); diff --git a/yarn-project/noir-contracts/src/contracts/private_token_airdrop_contract/src/interface.nr b/yarn-project/noir-contracts/src/contracts/private_token_airdrop_contract/src/interface.nr index babfad8d3255..1c6bc62fb5a3 100644 --- a/yarn-project/noir-contracts/src/contracts/private_token_airdrop_contract/src/interface.nr +++ b/yarn-project/noir-contracts/src/contracts/private_token_airdrop_contract/src/interface.nr @@ -12,13 +12,13 @@ struct PrivateTokenAirdropPrivateContextInterface { } impl PrivateTokenAirdropPrivateContextInterface { - fn at(address: Field) -> Self { + pub fn at(address: Field) -> Self { Self { address, } } - fn batchTransfer( + pub fn batchTransfer( self, context: &mut PrivateContext, sender: Field, @@ -40,7 +40,7 @@ impl PrivateTokenAirdropPrivateContextInterface { } - fn burn( + pub fn burn( self, context: &mut PrivateContext, amount: Field, @@ -54,7 +54,7 @@ impl PrivateTokenAirdropPrivateContextInterface { } - fn claim( + pub fn claim( self, context: &mut PrivateContext, amount: Field, @@ -68,7 +68,7 @@ impl PrivateTokenAirdropPrivateContextInterface { } - fn createClaims( + pub fn createClaims( self, context: &mut PrivateContext, amounts: [Field;16], @@ -112,7 +112,7 @@ impl PrivateTokenAirdropPrivateContextInterface { } - fn mint( + pub fn mint( self, context: &mut PrivateContext, amount: Field, @@ -126,7 +126,7 @@ impl PrivateTokenAirdropPrivateContextInterface { } - fn transfer( + pub fn transfer( self, context: &mut PrivateContext, amount: Field, @@ -150,7 +150,7 @@ struct PrivateTokenAirdropPublicContextInterface { } impl PrivateTokenAirdropPublicContextInterface { - fn at(address: Field) -> Self { + pub fn at(address: Field) -> Self { Self { address, } diff --git a/yarn-project/noir-contracts/src/contracts/private_token_contract/src/interface.nr b/yarn-project/noir-contracts/src/contracts/private_token_contract/src/interface.nr index 0f59f541a245..19b526671a3c 100644 --- a/yarn-project/noir-contracts/src/contracts/private_token_contract/src/interface.nr +++ b/yarn-project/noir-contracts/src/contracts/private_token_contract/src/interface.nr @@ -12,13 +12,13 @@ struct PrivateTokenPrivateContextInterface { } impl PrivateTokenPrivateContextInterface { - fn at(address: Field) -> Self { + pub fn at(address: Field) -> Self { Self { address, } } - fn mint( + pub fn mint( self, context: &mut PrivateContext, amount: Field, @@ -32,7 +32,7 @@ impl PrivateTokenPrivateContextInterface { } - fn transfer( + pub fn transfer( self, context: &mut PrivateContext, amount: Field, @@ -56,7 +56,7 @@ struct PrivateTokenPublicContextInterface { } impl PrivateTokenPublicContextInterface { - fn at(address: Field) -> Self { + pub fn at(address: Field) -> Self { Self { address, } diff --git a/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr b/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr index a6a9c45dca3c..6b2d7f9845a0 100644 --- a/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr +++ b/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr @@ -33,13 +33,13 @@ struct TestPrivateContextInterface { } impl TestPrivateContextInterface { - fn at(address: Field) -> Self { + pub fn at(address: Field) -> Self { Self { address, } } - fn consume_mint_private_message( + pub fn consume_mint_private_message( self, context: &mut PrivateContext, amount: Field, @@ -59,7 +59,7 @@ impl TestPrivateContextInterface { } - fn consume_mint_public_message( + pub fn consume_mint_public_message( self, context: &mut PrivateContext, amount: Field, @@ -79,7 +79,7 @@ impl TestPrivateContextInterface { } - fn createL2ToL1MessagePublic( + pub fn createL2ToL1MessagePublic( self, context: &mut PrivateContext, amount: Field, @@ -93,7 +93,7 @@ impl TestPrivateContextInterface { } - fn createNullifierPublic( + pub fn createNullifierPublic( self, context: &mut PrivateContext, amount: Field, @@ -107,7 +107,7 @@ impl TestPrivateContextInterface { } - fn emit_nullifier( + pub fn emit_nullifier( self, context: &mut PrivateContext, nullifier: Field @@ -119,7 +119,7 @@ impl TestPrivateContextInterface { } - fn emit_unencrypted( + pub fn emit_unencrypted( self, context: &mut PrivateContext, value: Field @@ -131,7 +131,7 @@ impl TestPrivateContextInterface { } - fn getPortalContractAddress( + pub fn getPortalContractAddress( self, context: &mut PrivateContext, aztec_address: Field @@ -143,7 +143,7 @@ impl TestPrivateContextInterface { } - fn getPublicKey( + pub fn getPublicKey( self, context: &mut PrivateContext, address: Field @@ -155,7 +155,7 @@ impl TestPrivateContextInterface { } - fn getThisAddress( + pub fn getThisAddress( self, context: &mut PrivateContext ) -> [Field; RETURN_VALUES_LENGTH] { @@ -165,7 +165,7 @@ impl TestPrivateContextInterface { } - fn getThisPortalAddress( + pub fn getThisPortalAddress( self, context: &mut PrivateContext ) -> [Field; RETURN_VALUES_LENGTH] { @@ -175,7 +175,7 @@ impl TestPrivateContextInterface { } - fn isTimeEqual( + pub fn isTimeEqual( self, context: &mut PrivateContext, time: Field @@ -187,7 +187,7 @@ impl TestPrivateContextInterface { } - fn testCodeGen( + pub fn testCodeGen( self, context: &mut PrivateContext, aField: Field, @@ -230,13 +230,13 @@ struct TestPublicContextInterface { } impl TestPublicContextInterface { - fn at(address: Field) -> Self { + pub fn at(address: Field) -> Self { Self { address, } } - fn consume_mint_public_message( + pub fn consume_mint_public_message( self, context: PublicContext, amount: Field, @@ -256,7 +256,7 @@ impl TestPublicContextInterface { } - fn createL2ToL1MessagePublic( + pub fn createL2ToL1MessagePublic( self, context: PublicContext, amount: Field, @@ -270,7 +270,7 @@ impl TestPublicContextInterface { } - fn createNullifierPublic( + pub fn createNullifierPublic( self, context: PublicContext, amount: Field, @@ -284,7 +284,7 @@ impl TestPublicContextInterface { } - fn emit_unencrypted( + pub fn emit_unencrypted( self, context: PublicContext, value: Field @@ -296,7 +296,7 @@ impl TestPublicContextInterface { } - fn isTimeEqual( + pub fn isTimeEqual( self, context: PublicContext, time: Field