Skip to content

Commit

Permalink
lints, coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
drortirosh committed Aug 29, 2023
1 parent 28e0fe7 commit c254faf
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"ethereumjs-wallet": "^1.0.1",
"hardhat-deploy": "^0.11.23",
"hardhat-deploy-ethers": "^0.3.0-beta.11",
"solidity-coverage": "^0.8.2",
"solidity-coverage": "^0.8.4",
"source-map-support": "^0.5.19",
"table": "^6.8.0",
"typescript": "^4.3.5"
Expand Down
26 changes: 13 additions & 13 deletions reports/gas-checker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
the destination is "account.entryPoint()", which is known to be "hot" address used by this account
it little higher than EOA call: its an exec from entrypoint (or account owner) into account contract, verifying msg.sender and exec to target)
╔══════════════════════════╤════════╗
║ gas estimate "simple" │ 29002
║ gas estimate "simple" │ 28990
╟──────────────────────────┼────────╢
║ gas estimate "big tx 5k" │ 125260 ║
╚══════════════════════════╧════════╝
Expand All @@ -12,28 +12,28 @@
║ │ │ │ (delta for │ (compared to ║
║ │ │ │ one UserOp) │ account.exec()) ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple │ 1 │ 81886 │ │ ║
║ simple │ 1 │ 81954 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple - diff from previous │ 2 │ │ 4418915187
║ simple - diff from previous │ 2 │ │ 4417515185
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple │ 10 │ 479680 │ │ ║
║ simple │ 10 │ 480006 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple - diff from previous │ 11 │ │ 4426115259
║ simple - diff from previous │ 11 │ │ 4425915269
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster │ 1 │ 88181 │ │ ║
║ simple paymaster │ 1 │ 88237 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster with diff │ 2 │ │ 4317814176
║ simple paymaster with diff │ 2 │ │ 4320014210
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster │ 10 │ 476964 │ │ ║
║ simple paymaster │ 10 │ 477158 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster with diff │ 11 │ │ 4318914187
║ simple paymaster with diff │ 11 │ │ 4327114281
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx 5k │ 1 │ 182967 │ │ ║
║ big tx 5k │ 1 │ 183011 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx - diff from previous │ 2 │ │ 14470019440
║ big tx - diff from previous │ 2 │ │ 14472219462
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx 5k │ 10 │ 1485396 │ │ ║
║ big tx 5k │ 10 │ 1485614 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx - diff from previous │ 11 │ │ 14472519465
║ big tx - diff from previous │ 11 │ │ 14473519475
╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝

3 changes: 1 addition & 2 deletions test/UserOp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ import {
} from '../typechain'
import { UserOperation } from './UserOperation'
import { Create2Factory } from '../src/Create2Factory'
import { TransactionRequest, BlockTag } from '@ethersproject/abstract-provider'
import { TransactionRequest } from '@ethersproject/abstract-provider'

import EntryPointSimulationsJson from '../artifacts/contracts/core/EntryPointSimulations.sol/EntryPointSimulations.json'
import EntryPointJson from '../artifacts/contracts/core/EntryPoint.sol/EntryPoint.json'
import { ethers } from 'hardhat'
import { IEntryPointSimulations } from '../typechain/contracts/core/EntryPointSimulations'

Expand Down
5 changes: 5 additions & 0 deletions test/entrypointsimulations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ describe('EntryPointSimulations', function () {
describe('Simulation Contract Sannity checks', () => {
const addr = createAddress()

// coverage skews gas checks.
if (process.env.COVERAGE != null) {
return
}

function costInRange (simCost: BigNumber, epCost: BigNumber, message: string): void {
const diff = simCost.sub(epCost).toNumber()
expect(diff).to.be.within(0, 300,
Expand Down
17 changes: 12 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,13 @@
dependencies:
antlr4ts "^0.5.0-alpha.4"

"@solidity-parser/parser@^0.16.0":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.1.tgz#f7c8a686974e1536da0105466c4db6727311253c"
integrity sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==
dependencies:
antlr4ts "^0.5.0-alpha.4"

"@szmarczak/http-timer@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
Expand Down Expand Up @@ -8779,13 +8786,13 @@ solhint@^3.3.7:
optionalDependencies:
prettier "^1.14.3"

solidity-coverage@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813"
integrity sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ==
solidity-coverage@^0.8.4:
version "0.8.4"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.4.tgz#c57a21979f5e86859c5198de9fbae2d3bc6324a5"
integrity sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==
dependencies:
"@ethersproject/abi" "^5.0.9"
"@solidity-parser/parser" "^0.14.1"
"@solidity-parser/parser" "^0.16.0"
chalk "^2.4.2"
death "^1.1.0"
detect-port "^1.3.0"
Expand Down

0 comments on commit c254faf

Please sign in to comment.