trader-xyz / nft-swap-sdk

Ethereum's missing p2p NFT and token swap library for web3 developers. Written in TypeScript. Powered by 0x.
https://swapsdk.xyz
MIT License
219 stars 83 forks source link

Impossible to create ETH → NFT order with "buildOrder" method #77

Closed ErnestMironov closed 2 years ago

ErnestMironov commented 2 years ago

It is possible to create an NFT → ETH order, but it is impossible to create ETH → NFT.

A transaction ERC-20 → NFT fails with an error "cannot estimate gas", although a transaction ERC-20 (native token) → NFT passes successfully.

johnrjj commented 2 years ago

No, you cannot programmatically move ETH via contract like that unfortunately -- you can only use ETH as the taker.