Skip to content

dangerousfood/t-erc20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transient Store ERC20 (TERC20)

This is a TSTORE version of ERC-20 implemented using a low iq search and replace on the Solady ERC-20 implementation replacing the allowance SSTORE and SLOAD with TSTORE and TLOAD.

A foundry template with custom solc binaries (from transient-storage) that supports transient storage opcodes in inline assembly.

forge build --use bin/solc
forge test  --use bin/solc

Why?

Arguably that the design for approve and allowance within the ERC-20 standard is necessary, but it creates a significant attack surface for unrevoked approvals.

The design is meant to create approvals that only last for the duration of the transaction. If TERC-20 were to be combined with an EIP-4337 wallet, we could create a safe approve/allowance system for users, without the need to revoke approvals.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Generated from hrkrshnn/tstore-template