Skip to content

Commit 12aa119

Browse files
authored
doc: Update permit.md
1 parent 1ad6cc1 commit 12aa119

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/permit.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Smart Contract Permit Function Tutorial
2-
The permit function allows a spender to transfer tokens on behalf of the token holder with a signed permission. This tutorial breaks down the use of the permit function into digestible steps.
2+
3+
Developers should use [ERC-2612 Permit](https://eips.ethereum.org/EIPS/eip-2612) instead of [ERC-20 Approve](https://eips.ethereum.org/EIPS/eip-20) because it allows for gasless token approvals through off-chain signatures, eliminating the need for a separate on-chain approval transaction. This not only reduces transaction costs but also streamlines user experience by enabling approvals and transfers to happen in a single transaction. By using Permit, developers can create more efficient and user-friendly applications, enhancing security and flexibility within the Ethereum ecosystem.
4+
5+
This tutorial breaks down the use of the permit function into digestible steps.
36

47
## Step 1: Import Required Modules
5-
Import the SigningKey module for signing the permit digest.
8+
Import the SigningKey module to sign the permit digest.
69

710
```js
811
const { SigningKey } = require("@ethersproject/signing-key");

0 commit comments

Comments
 (0)