Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a7dffe7
Add Transient Approval Extension for ERC-20
byshape Apr 2, 2024
d7eefe8
Fixed EIP requirements
byshape Apr 2, 2024
3eacea2
Update ERCS/eip-draft-tae-erc20.md
byshape Apr 3, 2024
11e2cce
Renamed file and added link to the discussion
byshape Apr 3, 2024
85f7d71
Fixed description
byshape Apr 3, 2024
a0d173e
Updated authors
byshape Apr 3, 2024
87ac36d
Apply suggestions from code review
byshape Apr 4, 2024
5146bb9
Merge branch 'master' into transient-approve
byshape Apr 4, 2024
fba3948
Replaced transient => temporary
byshape Apr 4, 2024
c5e98c2
Refined the Specification, Rationale and Backwards Compatibility sect…
byshape Apr 4, 2024
17a2741
Generalise the temporary storage description
byshape Apr 6, 2024
d70eb46
update based on PR comments
Amxx Jun 6, 2024
fe09677
Update ERCS/erc-7674.md
Amxx Jun 10, 2024
9d5885a
Merge pull request #1 from Amxx/transient-approve
byshape Jun 10, 2024
3c10621
Update based on PR comments
byshape Jun 10, 2024
1ce1aae
fix erc/eip links
ZumZoom Jul 15, 2024
8a11a87
Merge branch 'master' into transient-approve
byshape Jul 15, 2024
722f023
Updated based on PR comments
byshape Jul 15, 2024
51b7148
Update erc-7674.md: fix eip links
SamWilsn Aug 8, 2024
b7978f8
Update erc-7674.md
SamWilsn Aug 8, 2024
b3456ce
Merge branch 'transient-approve' into transient-approve-wip
byshape Jan 12, 2025
6171b37
Merge pull request #2 from byshape/transient-approve-wip
byshape Jan 12, 2025
2ec28b5
Merge branch 'master' into transient-approve
byshape Jan 12, 2025
7dd0208
Update erc-7674.md
SamWilsn Mar 6, 2025
31079e6
Update erc-7674.md
SamWilsn Mar 6, 2025
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
Prev Previous commit
Next Next commit
Update erc-7674.md
  • Loading branch information
SamWilsn authored Aug 8, 2024
commit b7978f82e13c8f944bb5aae4adc4bdabe6478a79
2 changes: 1 addition & 1 deletion ERCS/erc-7674.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function temporaryApprove(address spender, uint256 value) public returns (bool s
```
Call to `temporaryApprove(spender, value)` allows `spender` to withdraw within the same transaction from `msg.sender` multiple times, up to the `value` amount. This temporary allowance is to be considered in addition to the normal (persistent) [ERC-20](./eip-20.md) allowance, the total value that spender is able to spend during the transaction is thus capped by the sum of the temporary and the normal (persistent) allowances.

The storage for the temporary allowances MUST be different to that of the regular allowance. Compliant contracts MAY use the transient storage [EIP-1153](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1153.md) to keep the temporary allowance. For each `owner` and `spender`, the slot MUST be uniquely selected to avoid slot collision. Each slot index SHOULD be derived from the base slot index for temporary allowances, `owner` and `spender` addresses. Slot MAY be derived as `keccak256(spender . keccak256(owner . p))` where `.` is concatenation and `p` is `keccak256` from the string uniquely defining temporary allowances in the namespace of the implementing contract.
The storage for the temporary allowances MUST be different to that of the regular allowance. Compliant contracts MAY use the transient storage [EIP-1153](./eip-1153.md) to keep the temporary allowance. For each `owner` and `spender`, the slot MUST be uniquely selected to avoid slot collision. Each slot index SHOULD be derived from the base slot index for temporary allowances, `owner` and `spender` addresses. Slot MAY be derived as `keccak256(spender . keccak256(owner . p))` where `.` is concatenation and `p` is `keccak256` from the string uniquely defining temporary allowances in the namespace of the implementing contract.

Compliant contracts MUST add a temporary allowance check to the `transferFrom` function. The permanent allowance SHOULD only be spent after the temporary allowance has been exhausted.

Expand Down