diff --git a/hardhat.config.ts b/hardhat.config.ts index 94503eaf..cc6ebaed 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -30,15 +30,6 @@ function getNetwork (name: string): { url: string, accounts: { mnemonic: string // return getNetwork1(`wss://${name}.infura.io/ws/v3/${process.env.INFURA_ID}`) } -const optimizedCompilerSettings = { - version: '0.8.28', - settings: { - optimizer: { enabled: true, runs: 1000000 }, - evmVersion: 'cancun', - viaIR: true - } -} - // You need to export an object to set up your config // Go to https://hardhat.org/config/ to learn more @@ -53,10 +44,6 @@ const config: HardhatUserConfig = { optimizer: { enabled: true, runs: 1000000 } } }] - // overrides: { - // 'contracts/core/EntryPoint.sol': optimizedCompilerSettings, - // 'contracts/samples/SimpleAccount.sol': optimizedCompilerSettings - // } }, networks: { dev: { url: 'http://localhost:8545' }, diff --git a/test/entrypointsimulations.test.ts b/test/entrypointsimulations.test.ts index 12f1af1c..2834ca07 100644 --- a/test/entrypointsimulations.test.ts +++ b/test/entrypointsimulations.test.ts @@ -16,10 +16,13 @@ import { createAccount, createAccountOwner, createAddress, + decodeRevertReason, + deployEntryPoint, + findSimulationUserOpWithMin, fund, getAccountAddress, getAccountInitCode, - getBalance, deployEntryPoint, decodeRevertReason, findSimulationUserOpWithMin, findUserOpWithMin + getBalance } from './testutils' import { fillAndSign, fillSignAndPack, packUserOp, simulateHandleOp, simulateValidation } from './UserOp' @@ -284,23 +287,6 @@ describe('EntryPointSimulations', function () { await simulateValidation(packUserOp(userOp), entryPoint.address) .catch(e => { throw new Error(decodeRevertReason(e)!) }) }) - describe('compare to execution', () => { - let execVgl: number - let execPmVgl: number - const diff = 2000 - before(async () => { - execPmVgl = await findUserOpWithMin(async n => userOpWithGas(1e6, n), false, entryPoint, 1, 500000) - execVgl = await findUserOpWithMin(async n => userOpWithGas(n, execPmVgl), false, entryPoint, 1, 500000) - }) - it('account verification simulation cost should be higher than execution', function () { - console.log('simulation account validation', vgl, 'above exec:', vgl - execVgl) - expect(vgl).to.be.within(execVgl + 1, execVgl + diff, `expected simulation verificationGas to be 1..${diff} above actual, but was ${vgl - execVgl}`) - }) - it('paymaster verification simulation cost should be higher than execution', function () { - console.log('simulation paymaster validation', pmVgl, 'above exec:', pmVgl - execPmVgl) - expect(pmVgl).to.be.within(execPmVgl + 1, execPmVgl + diff, `expected simulation verificationGas to be 1..${diff} above actual, but was ${pmVgl - execPmVgl}`) - }) - }) it('should revert with AA2x if verificationGasLimit is low', async function () { expect(await simulateValidation(packUserOp(await userOpWithGas(vgl - 1, pmVgl)), entryPoint.address) .catch(decodeRevertReason))