ETH/Native Token support
Sell an NFT for ETH. Buy an NFT with ETH.
Swap SDK & 0x v4 NFT fully support buying NFTs using ETH (or the native token if not on mainnet).
Since ETH (or any native token on the EVM) is not technically an ERC20 (and doesn't have a 'token address'), we work around that by using a 'fake' address for ETH.
To require filling an order with ETH, hardcode the tokenAddress
to 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
(the common ERC20 representation of ETH)
From there, you can fill this order as usual (e.g. nftSwap.fillSignedOrder(...)
)
Native Tokens
Native token can vary with the EVM chain, although the underlying concept remains the same. It is the primary token that is used to pay gas fees and other transaction fees.
Mainnet: ETH
Ropsten: ETH
Polygon: MATIC
Optimism: OETH
BSC: BNB
Last updated