-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72fe3ea
commit 5b48dfb
Showing
15 changed files
with
89 additions
and
19 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
File renamed without changes.
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,6 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
pragma solidity ^0.8.26; | ||
|
||
contract BiconomyTokenPaymasterErrors { | ||
|
||
} |
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,6 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.8.26; | ||
|
||
interface IBiconomyTokenPaymaster { | ||
|
||
} |
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,17 +1,67 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.8.26; | ||
|
||
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; | ||
import { ECDSA as ECDSA_solady } from "@solady/src/utils/ECDSA.sol"; | ||
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; | ||
import {IEntryPoint} from "@account-abstraction/contracts/interfaces/IEntryPoint.sol"; | ||
import {UserOperationLib} from "@account-abstraction/contracts/core/UserOperationLib.sol"; | ||
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; | ||
import {BasePaymaster} from "../base/BasePaymaster.sol"; | ||
import "@account-abstraction/contracts/core/Helpers.sol" as Helpers; | ||
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; | ||
import "@openzeppelin/contracts/utils/Address.sol"; | ||
import { IEntryPoint } from "@account-abstraction/contracts/interfaces/IEntryPoint.sol"; | ||
import { SignatureCheckerLib } from "@solady/src/utils/SignatureCheckerLib.sol"; | ||
import { PackedUserOperation, UserOperationLib } from "@account-abstraction/contracts/core/UserOperationLib.sol"; | ||
import { BasePaymaster } from "../base/BasePaymaster.sol"; | ||
import { BiconomyTokenPaymasterErrors } from "../common/BiconomyTokenPaymasterErrors.sol"; | ||
import { IBiconomyTokenPaymaster } from "../interfaces/IBiconomyTokenPaymaster.sol"; | ||
|
||
contract BiconomyTokenPaymaster is | ||
BasePaymaster, | ||
ReentrancyGuard, | ||
BiconomyTokenPaymasterErrors, | ||
IBiconomyTokenPaymaster | ||
{ | ||
using UserOperationLib for PackedUserOperation; | ||
using SignatureCheckerLib for address; | ||
|
||
contract BiconomyTokenPaymaster { | ||
|
||
} | ||
constructor( | ||
address _owner, | ||
IEntryPoint _entryPoint | ||
) | ||
BasePaymaster(_owner, _entryPoint) | ||
{ } | ||
|
||
/** | ||
* @dev Validate a user operation. | ||
* This method is abstract in BasePaymaster and must be implemented in derived contracts. | ||
* @param userOp The user operation. | ||
* @param userOpHash The hash of the user operation. | ||
* @param maxCost The maximum cost of the user operation. | ||
*/ | ||
function _validatePaymasterUserOp( | ||
PackedUserOperation calldata userOp, | ||
bytes32 userOpHash, | ||
uint256 maxCost | ||
) | ||
internal | ||
override | ||
returns (bytes memory context, uint256 validationData) | ||
{ | ||
// Implementation of user operation validation logic | ||
} | ||
|
||
/** | ||
* @dev Post-operation handler. | ||
* This method is abstract in BasePaymaster and must be implemented in derived contracts. | ||
* @param mode The mode of the post operation (opSucceeded, opReverted, or postOpReverted). | ||
* @param context The context value returned by validatePaymasterUserOp. | ||
* @param actualGasCost Actual gas used so far (excluding this postOp call). | ||
* @param actualUserOpFeePerGas The gas price this UserOp pays. | ||
*/ | ||
function _postOp( | ||
PostOpMode mode, | ||
bytes calldata context, | ||
uint256 actualGasCost, | ||
uint256 actualUserOpFeePerGas | ||
) | ||
internal | ||
override | ||
{ | ||
// Implementation of post-operation logic | ||
} | ||
} |
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
Submodule v3-periphery
added at
80f26c
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
File renamed without changes.
File renamed without changes.