0

I know that you can request an authorization and the transfer of ERC20 tokens from a contract user to another address with approval() and transferFrom().

But it here any equivalent to do the same for native ETH and a fixed amount of ETH ?

Thanks !

3
  • You can change your ether for WEth which is an ERC20 token that has the exact value of ether
    – Majd TL
    Jul 21 at 11:34
  • Thanks, so no way to directly do it with the native ETH token ? Jul 21 at 11:36
  • no, not without a smart contract
    – Majd TL
    Jul 21 at 14:07

2 Answers 2

0

The question is not clear tbh but what I understood is, you are asking for a way to transfer ETH in solidity.

If that is the case then:

Yes You can easily make a funtion in your contract to send ether, specific amount of Eth by using transfer , send or call. The call is the most recommended way to transfer Eth, as it is the more specific and secure way. Check this out: https://solidity-by-example.org/sending-ether/

Hope this helps, if I misunderstood your question then pls let me know :)

1
  • Hi, I had a hard time to search on goole about this, so yes I may not be clear. I want to know if there is a way to initiate a transfer from a contract user's wallet to another address just like it is possible with the transferFrom function on ERC20 tokens. I don't think it is possible, the native ETH transfer functions only allow to transfer from the contract to another address if I got it well. Jul 21 at 12:06
0

No, unfortunately you cannot move Native ETH from an EOA to another address using a smart contract.

You can however move ETH if it is sitting on a smart contract or if the ETH is in the form of Wrapped ETH (Weth) which is a ERC20 tokenized version of ETH.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.