Skip to content

Commit

Permalink
chore:rename verifying singelton paymaster to sponsorship paymaster a…
Browse files Browse the repository at this point in the history
…nd also only keep v2 (overwrite v1.1.0)
  • Loading branch information
livingrockrises committed Nov 29, 2023
1 parent 1c5157c commit 6185ccf
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 704 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PAYMASTER_OWNER_ADDRESS_DEV=
PAYMASTER_OWNER_ADDRESS_PROD=
PAYMASTER_SIGNER_ADDRESS_DEV=
PAYMASTER_SIGNER_ADDRESS_PROD=
SPONSORSHIP_FEE_COLLECTOR_ADDRESS_PROD=
TOKEN_PAYMASTER_OWNER_ADDRESS_DEV=
TOKEN_PAYMASTER_OWNER_ADDRESS_PROD=
TOKEN_PAYMASTER_SIGNER_ADDRESS_DEV=
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Playground for ERC4337 Paymasters built with :heart_eyes: by Biconomy
#### Some examples

1. Singleton Verifying Paymaster: Acts as a sponsorship paymaster and lets Dapps manage deposit without deploying a new one for each Dapp.
1. Sponsorship Paymaster: Acts as a sponsorship paymaster and lets Dapps manage deposit without deploying a new one for each Dapp.

2. Token Paymaster: Extended version of Verifying Paymaster which can accept fees from user by withdrawing ERC20 tokens

Expand Down
2 changes: 1 addition & 1 deletion contracts/common/Errors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contract BasePaymasterErrors {
error CallerIsNotAnEntryPoint(address caller);
}

contract VerifyingPaymasterErrors {
contract SponsorshipPaymasterErrors {
/**
* @notice Throws when the Entrypoint address provided is address(0)
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IVerifyingSingletonPaymaster {
interface ISponsorshipPaymaster {
event EPGasOverheadChanged(
uint256 indexed _oldValue,
uint256 indexed _newValue
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,26 @@ import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {UserOperation, UserOperationLib} from "@account-abstraction/contracts/interfaces/UserOperation.sol";
import "../BasePaymaster.sol";
import {VerifyingPaymasterErrors} from "../common/Errors.sol";
import {SponsorshipPaymasterErrors} from "../common/Errors.sol";
import {MathLib} from "../libs/MathLib.sol";
import {IVerifyingSingletonPaymaster} from "../interfaces/paymasters/IVerifyingSingletonPaymaster.sol";

contract VerifyingSingletonPaymasterV2 is
import {ISponsorshipPaymaster} from "../interfaces/paymasters/ISponsorshipPaymaster.sol";

/**
* @title SponsorshipPaymaster
* @author livingrockrises<[email protected]>
* @notice Based on Infinitism 'VerifyingPaymaster' contract
* @dev This contract is used to sponsor the transaction fees of the user operations
* Uses a verifying signer to provide the signature if predetermined conditions are met
* regarding the user operation calldata. Also this paymaster is Singleton in nature which
* means multiple Dapps/Wallet clients willing to sponsor the transactions can share this paymaster.
* Maintains it's own accounting of the gas balance for each Dapp/Wallet client
* and Manages it's own deposit on the EntryPoint.
*/
contract SponsorshipPaymaster is
BasePaymaster,
ReentrancyGuard,
VerifyingPaymasterErrors,
IVerifyingSingletonPaymaster
SponsorshipPaymasterErrors,
ISponsorshipPaymaster
{
using ECDSA for bytes32;
using UserOperationLib for UserOperation;
Expand Down
286 changes: 0 additions & 286 deletions contracts/verifying/VerifyingSingletonPaymaster.sol

This file was deleted.

Loading

0 comments on commit 6185ccf

Please sign in to comment.