Skip to content
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

兄弟你好! #1

Closed
ManutdGTA opened this issue Aug 14, 2023 · 3 comments
Closed

兄弟你好! #1

ManutdGTA opened this issue Aug 14, 2023 · 3 comments

Comments

@ManutdGTA
Copy link

兄弟你好!
我在这链接看到了你的回复
zksync-sdk/zksync-crypto-c#9
但我不知道怎么引入这个.a文件,问了AI还是没解决,想问下大哥怎么解决的

@chengirii
Copy link
Owner

兄弟你好! 我在这链接看到了你的回复 zksync-sdk/zksync-crypto-c#9zksync-sdk/zksync-crypto-c#9 但我不知道怎么引入这个.a文件,问了AI还是没解决,想问下大哥怎么解决的

根据官方文档,需要在你的代码引用 https://docs.zksync.io/api/sdk/python/tutorial/#setup-crypto-library

@ManutdGTA
Copy link
Author

ManutdGTA commented Aug 16, 2023

谢谢兄弟,方便留个联系方式吗。我已经能用sdk,成功mint nft了。但现在在swap token上遇到了问题。文档里写需要传两个orders,例如我现在要把ETH换成USDC,但我不知道怎么传第二个orders。文档里写的很奇怪,我把submitter换成了wallet,但是第二个order不知道怎么获取,我只知道第一个order应该是我的ETH换成USDC的order

顺便说一声抱歉,找不到你的联系方式,只能在你的项目里提issue了

orderA = await walletA.get_order('USDT', 'ETH', Fraction(1500, 1), RatioType.token, Decimal('10.0'))
orderB = await walletB.get_order('ETH', 'USDT', Fraction(1, 1200), RatioType.token, Decimal('0.007'))
tx = await submitter.swap((orderA, orderB), 'ETH')

@chengirii
Copy link
Owner

谢谢兄弟,方便留个联系方式吗。我已经能用sdk,成功mint nft了。但现在在swap token上遇到了问题。文档里写需要传两个orders,例如我现在要把ETH换成USDC,但我不知道怎么传第二个orders。文档里写的很奇怪,我把submitter换成了wallet,但是第二个order不知道怎么获取,我只知道第一个order应该是我的ETH换成USDC的order

顺便说一声抱歉,找不到你的联系方式,只能在你的项目里提issue了

orderA = await walletA.get_order('USDT', 'ETH', Fraction(1500, 1), RatioType.token, Decimal('10.0'))
orderB = await walletB.get_order('ETH', 'USDT', Fraction(1, 1200), RatioType.token, Decimal('0.007'))
tx = await submitter.swap((orderA, orderB), 'ETH')

请留下你的联系方式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants