11import { createLogger , FeeJuicePaymentMethodWithClaim , Fr , L1FeeJuicePortalManager , PXE , waitForPXE , createPXEClient , Logger , FeeJuicePaymentMethod , PrivateFeePaymentMethod , PublicFeePaymentMethod } from "@aztec/aztec.js" ;
22import {
3- Chain ,
43 createPublicClient ,
54 createWalletClient ,
65 http ,
@@ -19,8 +18,6 @@ import { SponsoredFPCContract } from "@aztec/noir-contracts.js/SponsoredFPC";
1918import { deploySchnorrAccount } from "./deploy-account.js" ;
2019import { getSponsoredFPCInstance } from "../src/utils/sponsored_fpc.js" ;
2120import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice' ;
22- import * as dotenv from 'dotenv' ;
23- dotenv . config ( ) ;
2421
2522const setupSandbox = async ( ) => {
2623 const { PXE_URL = 'http://localhost:8081' } = process . env ;
@@ -32,11 +29,11 @@ const setupSandbox = async () => {
3229const MNEMONIC = 'test test test test test test test test test test test junk' ;
3330const FEE_FUNDING_FOR_TESTER_ACCOUNT = 1000000000000000000n ;
3431
35- let walletClient = getL1WalletClient ( process . env . L1_URL ! , 0 ) ;
32+ let walletClient = getL1WalletClient ( foundry . rpcUrls . default . http [ 0 ] , 0 ) ;
3633
3734const publicClient = createPublicClient ( {
3835 chain : foundry ,
39- transport : http ( process . env . L1_URL ) ,
36+ transport : http ( "http://127.0.0.1:8545" ) ,
4037} ) ;
4138
4239async function main ( ) {
@@ -143,19 +140,9 @@ main();
143140// from here: https://github.com/AztecProtocol/aztec-packages/blob/ecbd59e58006533c8885a8b2fadbd9507489300c/yarn-project/end-to-end/src/fixtures/utils.ts#L534
144141function getL1WalletClient ( rpcUrl : string , index : number ) {
145142 const hdAccount = mnemonicToAccount ( MNEMONIC , { addressIndex : index } ) ;
146- const chain : Chain = {
147- id : Number ( process . env . L1_CHAIN_ID ! ) ,
148- name : "test" ,
149- nativeCurrency : {
150- name : "ETH" ,
151- symbol : "ETH" ,
152- decimals : 18
153- } ,
154- rpcUrls : { default : { http : [ process . env . L1_URL ! ] } }
155- }
156143 return createWalletClient ( {
157144 account : hdAccount ,
158- chain,
145+ chain : foundry ,
159146 transport : http ( rpcUrl ) ,
160147 } ) ;
161148}
0 commit comments