hashgraph / hedera-smart-contracts

Contains Hedera Smart Contract Service supporting files
Apache License 2.0
37 stars 51 forks source link

ERC20 Wrapper Example #781

Open AlfredoG87 opened 1 month ago

AlfredoG87 commented 1 month ago

Problem

We need to showcase how we can extend an HTS Token and expose its functionalities via a regular smart contract that normally would extend the ERC20 Smart Contract.

Solution

Create a Fungible HTS Wrapper that exposes ERC-20 interface and under the hood calls the HTS Precompile methods, and also, with the ability to extend or add some custom method, like burnFrom ref here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Burnable.sol

Alternatives

No response