-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: nuking accounts from e2e setup #5574
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,7 @@ | ||||||
import { | ||||||
type AccountWalletWithPrivateKey, | ||||||
type AztecAddress, | ||||||
type EthAddress, | ||||||
type FeePaymentMethod, | ||||||
NativeFeePaymentMethod, | ||||||
PrivateFeePaymentMethod, | ||||||
|
@@ -13,40 +14,40 @@ import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token | |||||
|
||||||
import { jest } from '@jest/globals'; | ||||||
|
||||||
import { type EndToEndContext, publicDeployAccounts, setup } from '../fixtures/utils.js'; | ||||||
import { publicDeployAccounts, setup } from '../fixtures/utils.js'; | ||||||
|
||||||
jest.setTimeout(50_000); | ||||||
|
||||||
describe('benchmarks/tx_size_fees', () => { | ||||||
let ctx: EndToEndContext; | ||||||
let aliceWallet: AccountWalletWithPrivateKey; | ||||||
let bobAddress: AztecAddress; | ||||||
let sequencerAddress: AztecAddress; | ||||||
let gas: GasTokenContract; | ||||||
let fpc: FPCContract; | ||||||
let token: TokenContract; | ||||||
let gasPortalAddress: EthAddress; | ||||||
|
||||||
// setup the environment | ||||||
beforeAll(async () => { | ||||||
ctx = await setup(3); | ||||||
aliceWallet = ctx.wallets[0]; | ||||||
bobAddress = ctx.wallets[1].getAddress(); | ||||||
sequencerAddress = ctx.wallets[2].getAddress(); | ||||||
const { wallets, aztecNode, deployL1ContractsValues } = await setup(3); | ||||||
|
||||||
await ctx.aztecNode.setConfig({ | ||||||
gasPortalAddress = deployL1ContractsValues.l1ContractAddresses.gasPortalAddress; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wdyt about sticking to this as a convention?
Suggested change
Pros: Slightly more terse There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think in this case it doesn't matter much. |
||||||
|
||||||
aliceWallet = wallets[0]; | ||||||
bobAddress = wallets[1].getAddress(); | ||||||
sequencerAddress = wallets[2].getAddress(); | ||||||
|
||||||
await aztecNode.setConfig({ | ||||||
feeRecipient: sequencerAddress, | ||||||
allowedFeePaymentContractClasses: [getContractClassFromArtifact(FPCContract.artifact).id], | ||||||
}); | ||||||
|
||||||
await publicDeployAccounts(aliceWallet, ctx.accounts); | ||||||
await publicDeployAccounts(aliceWallet, wallets); | ||||||
}); | ||||||
|
||||||
// deploy the contracts | ||||||
beforeAll(async () => { | ||||||
gas = await GasTokenContract.at( | ||||||
getCanonicalGasTokenAddress(ctx.deployL1ContractsValues.l1ContractAddresses.gasPortalAddress), | ||||||
aliceWallet, | ||||||
); | ||||||
gas = await GasTokenContract.at(getCanonicalGasTokenAddress(gasPortalAddress), aliceWallet); | ||||||
token = await TokenContract.deploy(aliceWallet, aliceWallet.getAddress(), 'test', 'test', 18).send().deployed(); | ||||||
fpc = await FPCContract.deploy(aliceWallet, token.address, gas.address).send().deployed(); | ||||||
}); | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very much like putting this in line with all the other e2e tests