Skip to content

Conversation

byshape
Copy link
Contributor

@byshape byshape commented Apr 2, 2024

Among all cases of ERC-20 token transactions, a popular one is when smart contracts approve token spending to other contracts. Often tokens are approved for only one transaction.

Following the ERC-20 standard, if a smart contract wants to approve the spending of tokens to another smart contract for only one transaction, this causes the allowance saved in storage to be updated and retrieved.

Token allowances utilising EIP-1153 transient storage are a cheaper alternative to the regular storage allowances.

@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Apr 2, 2024

✅ All reviewers have approved.

byshape and others added 2 commits April 3, 2024 10:37
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
@eip-review-bot eip-review-bot changed the title Add Transient Approval Extension for ERC-20 Add ERC: Transient Approval Extension for ERC-20 Apr 3, 2024
@github-actions github-actions bot added w-ci and removed w-ci labels Apr 3, 2024
@github-actions github-actions bot removed the w-ci label Apr 3, 2024
@ZumZoom
Copy link

ZumZoom commented Apr 3, 2024

Commit 85f7d71 removes EIP-1153 reference from the description section but it seems that EIP Walidator needs to be fixed instead:

https://github.com/ethereum/ERCs/actions/runs/8536634399/job/23385573486#step:3:14

Error: error[preamble-refs-description]: unable to read file ``erc-1153.md``: Io: JsValue(Error: ENOENT: no such file or directory, open 'ERCS/erc-1153.md'

It seems that it disallows referencing any EIP in the description section.

@Amxx
Copy link
Contributor

Amxx commented Apr 3, 2024

IMO "transient" is a technical name that refers to the underlying mechanism used here, but should not be exposed in the ABI or in the "docuementation" or this feature. I propose using "temporary allowance" instead of "transient allowance", as I believe this naming would be more user-friendly for people that have no knowledge of EIP-1153

@Amxx
Copy link
Contributor

Amxx commented Apr 3, 2024

This ERC should clearly mention that:

  • No event is required when setting a temporary/transient allowance
  • This ERC does not break ERC20's transferFrom, because setting a temporary/transient allowance falls in the scope of "explicitelly authorizing the transfer"

@eip-review-bot eip-review-bot changed the title Add ERC: Transient Approval Extension for ERC-20 Add ERC: Temporary Approval Extension for ERC-20 Apr 4, 2024
@Amxx
Copy link
Contributor

Amxx commented Jun 6, 2024

@byshape created byshape#1 to update this PR. We should stry to get it merge sonner rather than latter.

Amxx and others added 2 commits June 10, 2024 15:40
Co-authored-by: Mikhail Melnik <by.zumzoom@gmail.com>
Update ERC-7674 based on PR comments
@github-actions github-actions bot removed the w-ci label Jun 10, 2024
ERCS/erc-7674.md Outdated
---
eip: 7674
title: Temporary Approval Extension for ERC-20
description: An interface for ephemeral ERC-20 approvals
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: An interface for ephemeral ERC-20 approvals
description: An interface for ERC-20 approvals lasting a single transaction

ERCS/erc-7674.md Outdated

## Motivation

User are often require to set token approval that will only be used once. It is common to leave unexpected approvals after these interactions. [EIP-1153](./eip-1153.md) introduces a cheap way to handle temporarily allowances.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will only be used once

This is a bit misleading. This approval can be used multiple times, as long as it's in a single transaction.

@github-actions github-actions bot added the w-ci label Jul 15, 2024
Copy link

The commit 8a11a87 (as a parent of e167942) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci label Aug 8, 2024
@SamWilsn
Copy link
Contributor

SamWilsn commented Aug 8, 2024

I took the liberty of fixing your EIP/ERC links. You do need to use [ERC-20](./eip-20.md) when linking to ERCs because of a quirk in our rendering system.

@eip-review-bot eip-review-bot enabled auto-merge (squash) March 6, 2025 14:55
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eip-review-bot eip-review-bot merged commit 892a03d into ethereum:master Mar 6, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants