Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
node-version: '16'
- uses: actions/checkout@v1
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
Expand All @@ -42,7 +42,7 @@ jobs:
with:
node-version: '16'
- uses: actions/checkout@v1
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
Expand All @@ -57,7 +57,7 @@ jobs:
with:
node-version: '16'
- uses: actions/checkout@v1
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
Expand All @@ -71,7 +71,7 @@ jobs:
with:
node-version: '16'
- uses: actions/checkout@v1
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
Expand All @@ -80,7 +80,7 @@ jobs:
- run: yarn compile

- run: FORCE_COLOR=1 yarn coverage
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: solidity-coverage
path: |
Expand Down
2 changes: 1 addition & 1 deletion contracts/core/EntryPoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard,
bytes32 private constant INNER_REVERT_LOW_PREFUND = hex"deadaa51";

uint256 private constant REVERT_REASON_MAX_LEN = 2048;
uint256 private constant PENALTY_PERCENT = 10;
uint256 private constant PENALTY_PERCENT = 100;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only change required to charge gas full limit specified in userOp


/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
Expand Down
2 changes: 1 addition & 1 deletion test/entrypoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ describe('EntryPoint', function () {

// we cannot access internal transaction state, so we have to rely on two separate transactions for estimation
// assuming 10% penalty is charged
const expectedGasPenalty = (veryBigCallGasLimit - callGasLimit.toNumber()) * 0.1
const expectedGasPenalty = (veryBigCallGasLimit - callGasLimit.toNumber())
const actualGasPenalty = gasUsed2 - gasUsed1

console.log(actualGasPenalty / expectedGasPenalty)
Expand Down
2 changes: 1 addition & 1 deletion test/samples/TokenPaymaster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ describe('TokenPaymaster', function () {
assert.equal(actualTokenChargeEvents.toString(), actualTokenCharge.toString())
assert.equal(actualTokenChargeEvents.toString(), expectedTokenCharge.toString())
assert.equal(actualTokenPriceWithMarkup.toString(), expectedTokenPriceWithMarkup.toString())
assert.closeTo(postOpGasCost.div(tx.effectiveGasPrice).toNumber(), 50000, 20000)
assert.closeTo(postOpGasCost.div(tx.effectiveGasPrice).toNumber(), 326000, 20000)
await ethers.provider.send('evm_revert', [snapshot])
})

Expand Down
Loading