@@ -14,12 +14,14 @@ describe("L2EthToken tests", () => {
14
14
let wallets : Array < Wallet > ;
15
15
let l2EthToken : L2EthToken ;
16
16
let bootloaderAccount : ethers . Signer ;
17
+ let selector : string ;
17
18
18
19
before ( async ( ) => {
19
20
await prepareEnvironment ( ) ;
20
21
await deployContractOnAddress ( TEST_ETH_TOKEN_SYSTEM_CONTRACT_ADDRESS , "L2EthToken" ) ;
21
22
l2EthToken = L2EthTokenFactory . connect ( TEST_ETH_TOKEN_SYSTEM_CONTRACT_ADDRESS , richWallet ) ;
22
23
bootloaderAccount = await ethers . getImpersonatedSigner ( TEST_BOOTLOADER_FORMAL_ADDRESS ) ;
24
+ selector = new ethers . utils . Interface ( ( await loadArtifact ( "IMailbox" ) ) . abi ) . getSighash ( "finalizeEthWithdrawal" ) ;
23
25
} ) ;
24
26
25
27
beforeEach ( async ( ) => {
@@ -165,11 +167,7 @@ describe("L2EthToken tests", () => {
165
167
166
168
describe ( "withdraw" , ( ) => {
167
169
it ( "event, balance, totalsupply" , async ( ) => {
168
- const selector = new ethers . utils . Interface ( ( await loadArtifact ( "IMailbox" ) ) . abi ) . getSighash (
169
- "finalizeEthWithdrawal"
170
- ) ;
171
170
const amountToWithdraw : BigNumber = ethers . utils . parseEther ( "1.0" ) ;
172
-
173
171
const message : string = ethers . utils . solidityPack (
174
172
[ "bytes4" , "address" , "uint256" ] ,
175
173
[ selector , wallets [ 1 ] . address , amountToWithdraw ]
@@ -199,9 +197,6 @@ describe("L2EthToken tests", () => {
199
197
} ) ;
200
198
201
199
it ( "event, balance, totalsupply, withdrawWithMessage" , async ( ) => {
202
- const selector = new ethers . utils . Interface ( ( await loadArtifact ( "IMailbox" ) ) . abi ) . getSighash (
203
- "finalizeEthWithdrawal"
204
- ) ;
205
200
const amountToWithdraw : BigNumber = ethers . utils . parseEther ( "1.0" ) ;
206
201
const additionalData : string = ethers . utils . defaultAbiCoder . encode ( [ "string" ] , [ "additional data" ] ) ;
207
202
const message : string = ethers . utils . solidityPack (
0 commit comments