ERC20 tokens which can be used on zkSycn and enable zkSync bridging #39
-
EnvironmentTestnet Provide a brief description of the functionality you're trying to implement.Hi team What is the specific issue or error you're encountering?Can you share the error messages or logs you're receiving, if any?Have you made any recent changes to the contract before encountering this issue?Are there any external libraries or contracts that your contract interacts with?Can you provide the relevant portions of your contract code where the issue is occurring?Have you tried to isolate the problem, and if so, what were the results?What steps have you already taken to try to resolve the issue?Repo Link (Optional)No response Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 8 replies
-
If your token already exists on Ethereum, you can just bridge it with a script that uses the default bridge. You can find the scripts to deposit and withdraw tokens in this page of the documentation. By using a default bridge, if nobody has sent that token to L2 before, the system will deploy a default ERC20 token contract on L2 behind the scenes, so you don't have to do it manually. Keep in mind that if the original contract on L1 had specific functionalities or methods, those will not be available on L2 if you follow this approach. On the other hand, you can create your own bridge and deploy the token contract in L2. You can use L1-L2 messaging for that. |
Beta Was this translation helpful? Give feedback.
-
Please feel free to check if this approach right. import "./interfaces/IERC20.sol"; contract ZkSyncERC20 is IERC20 {
} |
Beta Was this translation helpful? Give feedback.
-
FYI, token is not exist. I am just trying to deploy new ERC20 token contract which can be used on zkSync and enable zkSync bridging. |
Beta Was this translation helpful? Give feedback.
-
Also do I just need to add specific functions or implementations to ERC20 standard if token is available on zkSync? |
Beta Was this translation helpful? Give feedback.
-
@uF4No Thanks for your reply. Yeah, my ERC20 token is typical form of ERC20 standard from Openzeppelin. Do you mean, I just need to deploy this token contract to zkSync era without change anything? No need to deploy to L1? |
Beta Was this translation helpful? Give feedback.
-
@uF4No Hi Antonio, Do you mind to give me some instructions? |
Beta Was this translation helpful? Give feedback.
-
@uF4No No no. We are in need of token available on Ethereum. But is should be available on zkSync and enable zkSync bridging. So what should be best approach |
Beta Was this translation helpful? Give feedback.
-
Hi @uF4No |
Beta Was this translation helpful? Give feedback.
-
I am just bridging ERC20 token on Goerli to zkTestnet. Also I want to know what other processes we need to do when we go on mainnnet? |
Beta Was this translation helpful? Give feedback.
-
https://goerli.etherscan.io/address/0x4341Ff79E0d988D76BfE83CA081624d77f08764E fyi, deployment proceed after changing hardhat deploy command but still not proceeding here. @dutterbutter |
Beta Was this translation helpful? Give feedback.
-
I think this deposit done. But I am not able to find my token available in L2. |
Beta Was this translation helpful? Give feedback.
@akyo8 the command is
yarn hardhat deploy-zksync --script <NAME OF FILE>
notyarn hardhat zksync-deploy --script <FILE>
. I see the error in the docs and will update.