wyvern-v3 icon indicating copy to clipboard operation
wyvern-v3 copied to clipboard

Transfer relayer fee for anyERC20ForERC1155

Open ansoncsh opened this issue 2 years ago • 3 comments

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.

ansoncsh avatar Mar 28 '22 10:03 ansoncsh

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 avatar Apr 11 '22 16:04 smitea

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?

ansoncsh avatar Apr 12 '22 08:04 ansoncsh

see that 56#.

smitea avatar Apr 15 '22 06:04 smitea