1

I want a ERC-1155 contract that allows anyone to "wrap" any ERC-20 token.

Well, that's impossible, because when a ERC-20 token would be added, need to emit events for all its balances, but accounts with balances cannot be en enumerated. Also we can't emit events when the underlying token transfers.

So, I want an "almost ERC-1155" contract that would be ERC-1155 except that for a newly added ERC-20 token the created "1155" token would not emit or not always emit "Transfer" events.

Does such a contract already exist?

1

I have created a dApp that does an ERC1155<->ERC20<->ETH bridge (ERC-721 to be added - please make a pull request). Convert between ERC-1155, ERC-20, and ETH in both directions in several ways (locking or wrapping). So 2x2+1=5 ways to convert. No fees. Several blockchains deployed.

Live: https://erc1155.portonvictor.org/#/

GitHub: https://github.com/vporton/wrap-tokens

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.