Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
drortirosh committed Feb 4, 2025
1 parent ee54899 commit 33b294a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/test/TestUtil.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract TestUtil {
return op.encode(0);
}

function _isEip7702InitCode(bytes calldata initCode) external pure returns (bool) {
function isEip7702InitCode(bytes calldata initCode) external pure returns (bool) {
return _isEip7702InitCode(initCode);
}
}
8 changes: 4 additions & 4 deletions test/entrypoint-7702.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('EntryPoint EIP-7702 tests', function () {

const deployedDelegateCode = hexConcat(['0xef0100', mockDelegate])

before(async function() {
before(async function () {
this.timeout(20000)
chainId = await ethers.provider.getNetwork().then(net => net.chainId)
entryPoint = await deployEntryPoint()
Expand All @@ -65,18 +65,18 @@ describe('EntryPoint EIP-7702 tests', function () {

[1, 10, 20, 30].forEach(pad =>
it(`should accept initCode with zero pad ${pad}`, async () => {
expect(await testUtil._isEip7702InitCode(EIP7702_PREFIX + '00'.repeat(pad))).to.be.true
expect(await testUtil.isEip7702InitCode(EIP7702_PREFIX + '00'.repeat(pad))).to.be.true
})
)

it('should accept initCode with just prefix', async () => {
expect(await testUtil._isEip7702InitCode(EIP7702_PREFIX)).to.be.true
expect(await testUtil.isEip7702InitCode(EIP7702_PREFIX)).to.be.true
})

it('should not accept EIP7702 if first 20 bytes contain non-zero', async () => {
const addr = EIP7702_PREFIX + '0'.repeat(40 - EIP7702_PREFIX.length) + '01'
expect(addr.length).to.eql(42)
expect(await testUtil._isEip7702InitCode(addr)).to.be.false
expect(await testUtil.isEip7702InitCode(addr)).to.be.false
})
})

Expand Down

0 comments on commit 33b294a

Please sign in to comment.