{"repo":"0xsequence/erc20-meta-token","free":true,"listed":false,"github":"https://github.com/0xsequence/erc20-meta-token","clone":"git clone https://github.com/0xsequence/erc20-meta-token.git","description":"General ERC20 to ERC1155 Token Wrapper Contract","language":"TypeScript","stars":206,"topics":["ethereum","erc20","meta-transaction-functionality"],"license":null,"category":"blockchain-web3","readme_excerpt":"General ERC20 to ERC1155 Token Wrapper Contract =============================================== Allows any ERC-20 token to be wrapped inside of an ERC-1155 contract, and thereby allows an ERC-20 token to function as an ERC-1155 contract. Getting started Install yarn add @0xsequence/erc20-meta-token or npm install @0xsequence/erc20-meta-token Usage from Solidity How does it work? When you deposit ERC-20 tokens (e.g. DAI) in the wrapper contract, it will give you back ERC-1155 metaTokens (e.g. MetaDAI) with a 1:1 ratio. These metaToken have native meta-transaction functionalities, which allow you to transfer tokens without doing an on-chain transaction yourself, but by simply signing a message and broadcasting this message to \"executors\". You can also \"approve\" addresses to transfer tokens on your behalf with a signed message instead of calling the ERC-20 approve() function. If you want to transfer some metaTokens, you simply need to call safeTransferFrom(sender, recipient, ERC20tokenAddress, amount, metaTransactionData) where token address is the address of the ERC-20 token you want to transfer. Obtaining the balance is similar; balanceOf(user, ERC20tokenAddress) . You can, at anytime, convert back these metaTokens back to their original tokens by calling the withdraw() method. Gas Fee Abstraction When transferring metaTokens, like metaDAI, you can specify in which currency you want the transaction fee to be paid in. By default, ERC20 token transfers require users to pay the f","default_branch":null,"files":null,"tree":[],"storefront":"/r/0xsequence","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/0xsequence/erc20-meta-token/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}