ERC20 token function call

Hi guys, Does anyone know how does the ERC20 token function call a third party contract to do the transfer?

Thank you in advance!!!

Hey @ArielVB,

In order to be able to take an erc20 from another address (both a smart contract or a user), you need to use function transferFrom(address from, address to, uint256 value)

Let me know if that answered your question, if not please explain what you are trying to do.

Happy coding,

1 Like

Hi Dani,
Thank you so much for your answer I’ll give it a try!
I’m producing virtual events on social media and I need an smart contract to lock funds pay teams etc.
My business model is at risk with the gas fees on Ethereum I already have an ERC20 token I really don’t know if cosmos or polkadot are compatible with ERC20 tokens and smart contracts on Ethereum… Have you heard something around you about these topics?
Thank you again for your replay, I really appreciate it.

Hey @ArielVB

I am not familiar with the Polkadot protocol so I am not really able to help there.
If you just need a smart contract that handles ether (deposit / withdraw etc…) the gas fee should not be an issue as your contract logic is going to remain minimal therefore it won’t use too much gas.
If you want me to have a look of your contract post your github repo.


Well, even if my ERC20 token wont be used as a cryptocurrency it will make several calls between the smartcontract (father lets say and its sons ) and wallets, that is what I’m afraid of, it will make the business model not profitable…

I dont have the code sur github I have 2 files on my computer, if you want I could send it you by email.

Thank you again for your help!

Consider that all the tx fees are paid by the user (msg.sender) so, if your project does not involve the calls of multiple external protocols (such as DEFI) then you will be ok.
Also I suggest you to test it with truffle if you have not done that already, so you will see how much gas the user will pay for each tx.
Feel free to DM me your code, I will have a look tomorrow.

Happy coding,


Thank you so much for you kind help! I will.
Have a great day