pub async fn prepare_fee_juice_on_l1(
eth_client: &EthClient,
l1_addresses: &L1ContractAddresses,
recipient: &AztecAddress,
) -> Result<FeeJuiceBridgeResult, Error>Expand description
Mint Fee Juice on L1 and bridge it to L2 via the Fee Juice Portal.
Mirrors upstream GasBridgingTestHarness.prepareTokensOnL1():
- Queries
getMintAmount()from the FeeAssetHandler - Mints ERC-20 tokens on L1
- Approves the portal to spend them
- Calls
depositToAztecPublicon the portal - Parses the
DepositToAztecPublicevent for the message leaf index
Returns the claim data needed for FeeJuicePaymentMethodWithClaim.