Open ansoncsh opened 2 years ago
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.
The
anyERC1155ForERC20
andanyERC20ForERC1155
just apply to one ERC1155 with one ERC20 exchange, so if you want to exchange many ERC20 for one ERC1155, you can useatomicize
to wrap many ERC20 transactions assecondCall
parameters inatomicMatchWith
. or you can useanyAddOne
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:
anyERC1155ForERC20
and anyERC20ForERC1155
Is it required to write a customized solidity for cases like it? Or does our purpose make no sense?
Hi, I go through the tests in "7-static-market-matching.js" to exchange ERC1155 and ERC20 with
anyERC1155ForERC20
andanyERC20ForERC1155
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.