Skip to content

Commit d6ce6d0

Browse files
authored
update
1 parent 4db0fcf commit d6ce6d0

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

scripts/fees.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const setupSandbox = async () => {
2424
};
2525

2626
const MNEMONIC = 'test test test test test test test test test test test junk';
27-
const FEE_FUNDING_FOR_TESTER_ACCOUNT = BigInt(1_000e20);
27+
const FEE_FUNDING_FOR_TESTER_ACCOUNT = 1000000000000000000n;
2828

2929
let walletClient = getL1WalletClient(foundry.rpcUrls.default.http[0], 0);
3030
const ownerEthAddress = walletClient.account.address;
@@ -40,14 +40,11 @@ async function main() {
4040
let wallets: AccountWallet[] = [];
4141
let logger: Logger;
4242

43-
const amount = FEE_FUNDING_FOR_TESTER_ACCOUNT;
44-
4543
logger = createLogger('aztec:aztec-starter');
4644

4745
pxe = await setupSandbox();
4846
wallets = await getInitialTestAccountsWallets(pxe);
4947
const nodeInfo = (await pxe.getNodeInfo())
50-
const l1ContractAddresses = nodeInfo.l1ContractAddresses;
5148

5249
// Setup Schnorr AccountManager
5350

@@ -60,16 +57,15 @@ async function main() {
6057

6158
// Setup and bridge fee asset to L2 to get fee juice
6259

63-
const feeJuicePortalManager = new L1FeeJuicePortalManager(
64-
l1ContractAddresses.feeJuicePortalAddress,
65-
l1ContractAddresses.feeJuiceAddress,
60+
const feeJuicePortalManager = await L1FeeJuicePortalManager.new(
61+
pxe,
6662
//@ts-ignore
6763
publicClient,
6864
walletClient,
6965
logger,
7066
);
7167

72-
const claim = await feeJuicePortalManager.bridgeTokensPublic(feeJuiceReceipient, amount, true);
68+
const claim = await feeJuicePortalManager.bridgeTokensPublic(feeJuiceReceipient, FEE_FUNDING_FOR_TESTER_ACCOUNT, true);
7369

7470
const feeJuice = await FeeJuiceContract.at(nodeInfo.protocolContractAddresses.feeJuice, wallets[0])
7571
logger.info(`Fee Juice minted to ${feeJuiceReceipient} on L2.`)
@@ -98,7 +94,7 @@ async function main() {
9894

9995
// This uses bananaCoin as the fee paying asset that will be exchanged for fee juice
10096
const fpc = await FPCContract.deploy(wallets[0], bananaCoin.address, wallets[0].getAddress()).send().deployed()
101-
const fpcClaim = await feeJuicePortalManager.bridgeTokensPublic(fpc.address, amount, true);
97+
const fpcClaim = await feeJuicePortalManager.bridgeTokensPublic(fpc.address, FEE_FUNDING_FOR_TESTER_ACCOUNT, true);
10298
// 2 public txs to make the bridged fee juice available
10399
// Mint some bananaCoin and send to the newWallet to pay fees privately
104100
await bananaCoin.methods.mint_to_private(wallets[0].getAddress(), newWallet.getAddress(), FEE_FUNDING_FOR_TESTER_ACCOUNT).send().wait()

0 commit comments

Comments
 (0)