-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't deposit tokens #1
Comments
Hey, I saw you closed the issue but feel free to open it again if you think there is something wrong. |
Ok, I reopened it, because I still think it doesn't make sense. Shouldn't you be able to send tokens to the contract address on both sides of the bridge to give liquidity? |
I think your problem is different, not the liquidity. Because in the deposit process it just transfers tokens from your wallet to bridge contract. Can you provide blockchain explorer links if possible. I can take a look. |
I'm using private test nets at the moment, so no links sorry. Maybe you can explain how I should be depositing tokens in the bridge, because I think I'm doing it wrong. I basically just sent it from my wallet to the contact address on side B of the bridge, then also side A Is that not what I'm supposed to do before starting swaps? What is the proper way to provide the liquidity? |
Let's say you make a bridge for $XYZ. There are $XYZ (BSC) and $XYZ (ERC) versions. To create BSC to ETH and ETH to BSC bridges, you need to deploy bridge.sol to ETH and BSC networks. After that you need to transfer $XYZ (ERC) (this is what you call liquidity) to ETH bridge contract and $XYZ (BSC) to BSC bridge contract. I think your problem might be related with the token or configuration in the config.js file. Does your token have any tax or max wallet limits? |
It turns out my problem was that I was directly sending from my wallet to the contract address. I should have been using the deposit function to send the initial liquidity. I have to do some more testing, but I think everything is woking now. Thank you. |
Well, now remix.ethereum.org won't even let me deposit tokens into the contract. I don't know what's going on but I'm tired of troubleshooting this thing. |
Issue solved. You need to use the deployer private key in config.js. I had switched it during testing and that's why there were so many problems. |
If I deposit tokens on the first of the bridges (A) so that there is liquidity for someone to transfer back from bridge B then the app errors out and metamask complains it can't calculate gas.
However, if I deposit tokens on the contract on bridge B and leave A alone, everything seems to work ok. Of course people will have to transfer from A to B first so there is liquidity for bridging back.
I hope this makes sense. If not I can elaborate further.
The text was updated successfully, but these errors were encountered: