Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typos #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ The ERC-20 paymaster supports:

## Usage

This paymaster has four modes. It allows the user to be simply made to pay themselves, but also allows the selection of a guarnator who can front the ERC-20 token fees during validation, allowing the user to approve tokens to the paymaster or fetch / claim tokens if they do not already have any. For each mode, it is possible to set a ERC-20 token spend limit to protect against sudden price fluctuations or oracle manipulation.
This paymaster has four modes. It allows the user to be simply made to pay themselves, but also allows the selection of a guarantor who can front the ERC-20 token fees during validation, allowing the user to approve tokens to the paymaster or fetch / claim tokens if they do not already have any. For each mode, it is possible to set a ERC-20 token spend limit to protect against sudden price fluctuations or oracle manipulation.

Mode 0:
- The user (sender) pays for gas fees with the ERC-20 token.
- `paymasterData` is empty

Mode 1:
- The user (sender) pays for gas fees with the ERC-20 token,
- There is a limit to the amount of ERC-20 tokens that can be taken from the user for the user opertion.
- There is a limit to the amount of ERC-20 tokens that can be taken from the user for the user operation.
- `paymasterData`: "0x01" + token spend limit (32 bytes)

Mode 2:
Expand All @@ -37,7 +37,7 @@ Mode 2:

Mode 3:
- A guarantor fronts the ERC-20 token gas fees during validation, and expects the user to be able to pay the actual cost during the postOp phase and get refunded. Otherwise the guarantor is liable.
- There is a limit to the amount of ERC-20 tokens that can be taken from the user/guarantor for the user opertion.
- There is a limit to the amount of ERC-20 tokens that can be taken from the user/guarantor for the user operation.
- `paymasterData`: "0x03" + token spend limit (32 bytes) + guarantor address (20 bytes) + validUntil (6 bytes) + validAfter (6 bytes) + guarantor signature (dynamic bytes)

## Development
Expand Down Expand Up @@ -117,4 +117,4 @@ The audits of the ERC-20 Paymaster can be found in the audits folder:
- [OpenZeppelin audit 2024 March](./audits/2024-03-openzeppelin.pdf)

## License
This project is licensed under the MIT license.
This project is licensed under the MIT license.