Can a payable function in a solidity contract only receive the native 'protocol' token or coin of the chain?
So for example, a payable
function on an ERC-721 contract can only receive ether? The same for a BEP-721 contract with a payable
method - it can only receive BNB?
Like a few others, I'm trying to understand payable
, and whether it is needed in the case of a marketplace that is using another token as its 'unit of currency'.
I believe that in the case of an ERC-20 or BEP-20 token as the 'unit of value or currency' for the market, then payable
isn't required.
Instead we follow an approve and transfer process similar to the one described here...
Make function payable for a specific ERC20 token?
And here...
How to create a Payable function that only accepts a customer token?
Have I understood this correctly?