-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into features/SMA-314-fix-ci
- Loading branch information
Showing
55 changed files
with
1,626 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Check Branch Name | ||
on: | ||
create: | ||
|
||
jobs: | ||
check-branch-name: | ||
runs-on: ubuntu-latest | ||
if: github.event.ref_type == 'branch' && !contains(github.ref, 'refs/heads/main') && !contains(github.ref, 'refs/heads/develop') | ||
steps: | ||
- name: Check Branch Name | ||
run: | | ||
BRANCH_PREFIX_REGEX="^(features/|fixes/|releases/).+" | ||
BRANCH_NAME=${GITHUB_REF#refs/heads/} | ||
if [[ ! $BRANCH_NAME =~ $BRANCH_PREFIX_REGEX ]]; then | ||
echo "Invalid branch name: $BRANCH_NAME" | ||
echo "Branch name must start with 'features/', 'fixes/', or 'releases/'." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ forge-cache/ | |
typechain-types | ||
typechain | ||
typings | ||
yarn-error.log | ||
|
||
#Hardhat files | ||
cache | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//SPDX-License-Identifier: Unlicense | ||
pragma solidity 0.8.17; | ||
pragma solidity ^0.8.20; | ||
|
||
import "./Create3.sol"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
contracts/interfaces/paymasters/IVerifyingSingletonPaymaster.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
interface IVerifyingSingletonPaymaster { | ||
event EPGasOverheadChanged( | ||
uint256 indexed _oldValue, | ||
uint256 indexed _newValue | ||
); | ||
|
||
event FixedPriceMarkupChanged( | ||
uint32 indexed _oldValue, | ||
uint32 indexed _newValue | ||
); | ||
|
||
event VerifyingSignerChanged( | ||
address indexed _oldSigner, | ||
address indexed _newSigner, | ||
address indexed _actor | ||
); | ||
|
||
event FeeCollectorChanged( | ||
address indexed _oldFeeCollector, | ||
address indexed _newFeeCollector, | ||
address indexed _actor | ||
); | ||
event GasDeposited(address indexed _paymasterId, uint256 indexed _value); | ||
event GasWithdrawn( | ||
address indexed _paymasterId, | ||
address indexed _to, | ||
uint256 indexed _value | ||
); | ||
event GasBalanceDeducted( | ||
address indexed _paymasterId, | ||
uint256 indexed _charge | ||
); | ||
event PremiumCollected( | ||
address indexed _paymasterId, | ||
uint256 indexed _premium | ||
); | ||
|
||
/** | ||
* @dev Returns the current balance of the paymasterId(aka fundingId) | ||
* @param paymasterId The address of the paymasterId | ||
*/ | ||
function getBalance( | ||
address paymasterId | ||
) external view returns (uint256 balance); | ||
|
||
/** | ||
* @dev updates the verifyingSigner address | ||
* @param _newVerifyingSigner The new verifyingSigner address | ||
*/ | ||
function setSigner(address _newVerifyingSigner) external payable; | ||
|
||
/** | ||
* @dev updates the postOp + unacocunted gas overhead | ||
* @param value The new value | ||
*/ | ||
function setUnaccountedEPGasOverhead(uint256 value) external payable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.8.20; | ||
|
||
library MathLib { | ||
function minuint256( | ||
uint256 a, | ||
uint256 b | ||
) internal pure returns (uint256 result) { | ||
assembly { | ||
result := xor(b, mul(xor(b, a), gt(a, b))) | ||
} | ||
} | ||
|
||
function maxuint256( | ||
uint256 a, | ||
uint256 b | ||
) internal pure returns (uint256 result) { | ||
assembly { | ||
result := xor(a, mul(xor(a, b), gt(b, a))) | ||
} | ||
} | ||
|
||
function minuint32( | ||
uint32 a, | ||
uint32 b | ||
) internal pure returns (uint32 result) { | ||
assembly { | ||
result := xor(b, mul(xor(b, a), gt(a, b))) | ||
} | ||
} | ||
|
||
function maxuint32( | ||
uint32 a, | ||
uint32 b | ||
) internal pure returns (uint32 result) { | ||
assembly { | ||
result := xor(a, mul(xor(a, b), gt(b, a))) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.