import{BigNumber}from'ethers'import{expect}from'../setup'import{migratedWithdrawalGasLimit}from'../../src/utils/message-utils'describe('Message Utils',()=>{describe('migratedWithdrawalGasLimit',()=>{it('should have a max of 25 million',()=>{constdata='0x'+'ff'.repeat(15_000_000)constresult=migratedWithdrawalGasLimit(data)expect(result).to.eq(BigNumber.from(25_000_000))})it('should work for mixes of zeros and ones',()=>{consttests=[{input:'0x',result:BigNumber.from(200_000)},{input:'0xff',result:BigNumber.from(200_000+16)},{input:'0xff00',result:BigNumber.from(200_000+16+4)},{input:'0x00',result:BigNumber.from(200_000+4)},{input:'0x000000',result:BigNumber.from(200_000+4+4+4)},]for(consttestoftests){constresult=migratedWithdrawalGasLimit(test.input)expect(result).to.eq(test.result)}})})})