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

Transfer relayer fee for anyERC20ForERC1155 #76

Open
ansoncsh opened this issue Mar 28, 2022 · 3 comments
Open

Transfer relayer fee for anyERC20ForERC1155 #76

ansoncsh opened this issue Mar 28, 2022 · 3 comments

Comments

@ansoncsh
Copy link

Hi, I go through the tests in "7-static-market-matching.js" to exchange ERC1155 and ERC20 with anyERC1155ForERC20 and anyERC20ForERC1155

Wonder if it is possible to transfer ERC20 to 2 addresses, one for ERC1155 owner and another for a relayer, in second call

It would be appreciated if someone could help on it.

Thanks a lot.

@smitea
Copy link

smitea commented Apr 11, 2022

The anyERC1155ForERC20 and anyERC20ForERC1155 just apply to one ERC1155 with one ERC20 exchange, so if you want to exchange many ERC20 for one ERC1155, you can use atomicize to wrap many ERC20 transactions as secondCall
parameters in atomicMatchWith. or you can use anyAddOne for your scene.

@ansoncsh
Copy link
Author

The anyERC1155ForERC20 and anyERC20ForERC1155 just apply to one ERC1155 with one ERC20 exchange, so if you want to exchange many ERC20 for one ERC1155, you can use atomicize to wrap many ERC20 transactions as secondCall parameters in atomicMatchWith. or you can use anyAddOne for your scene.

@smitea Thank you for suggestion.

We tried to use atomicize in counterorder but it cannot pass the validation because anyERC1155ForERC20 will check whether the 2nd call is transferFrom(address,address,uint256). atomicize multiple ERC20 transactions will make this validation fail.

We also tried to use any to any pair and it so called "works" ("works" means that I can transfer ERC1155 to one wallet and transfer ERC20 to multiple wallets). However, it does not have any order matching validation.

What we are trying to achieve:

  • match order with similar validation inside anyERC1155ForERC20 and anyERC20ForERC1155
  • support multiple ERC20 transactions

Is it required to write a customized solidity for cases like it?
Or does our purpose make no sense?

@smitea
Copy link

smitea commented Apr 15, 2022

see that 56#.

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