metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

[Bug]: ETH Mainnet - Unable to deposit to smart contract.

Open catsmells opened this issue 2 years ago • 7 comments

Describe the bug

When attempting to deposit ETH to a deployed smart contract, MetaMask grays out the ability to create the transaction despite ample balance for the amount being sent, and the gas itself.

Expected behavior

No response

Screenshots/Recordings

https://recordit.co/mhS6eX9NmU

Steps to reproduce

  1. Copy deployed smart contract address (deployed from Trezor-Metamask Bridge).
  2. Paste it in "Send".
  3. Specify amount of ETH you wish to send.

Error messages or log output

No response

Version

11.5.1

Build type

None

Browser

Firefox

Operating system

Windows

Hardware wallet

Trezor

Additional context

No response

Severity

No response

catsmells avatar Dec 09 '23 21:12 catsmells

Hello @catsmells, Visit the Ethereum official page to resolve this issue.

Note: you can also initiate a chat with the support for more assistance and enquires.

That's a phishing link. Reported. The actual ETH link: https://ethereum.org/en/community/support/

catsmells avatar Dec 09 '23 23:12 catsmells

Thank you for your report @catsmells ! We'll look into it. I'm able to reproduce it as well on v11.6.2 and v11.7

bschorchit avatar Dec 11 '23 22:12 bschorchit

does this contract have a receive function @metamaskbot ? I've encountered this behaviour with contracts which don't have receive function, but I can normally send ETH to contract addresses which have receive.

Example: Sending ETH to this address works normally:

contract Test {
   receive() external payable { }    
}

but sending ETH to this contract does not work:

contract Test {}

The gas is set to 0 and cannot proceed to the next screen (similarly to your recording). I see the error Error#6: Unable to determine contract standard in the console`. This closely relates to this other ticket https://github.com/MetaMask/metamask-extension/issues/21867 and we need a way to better handle those cases.

Screenshot from 2023-12-14 13-55-31

cc @bschorchit

seaona avatar Dec 14 '23 12:12 seaona

does this contract have a receive function @metamaskbot ? I've encountered this behaviour with contracts which don't have receive function, but I can normally send ETH to contract addresses which have receive.

Example: Sending ETH to this address works normally:

contract Test {
   receive() external payable { }    
}

but sending ETH to this contract does not work:

contract Test {}

The gas is set to 0 and cannot proceed to the next screen (similarly to your recording). I see the error Error#6: Unable to determine contract standard in the console`. This closely relates to this other ticket #21867 and we need a way to better handle those cases.

Screenshot from 2023-12-14 13-55-31

cc @bschorchit

Interesting tidbit - contracts without the receive function allow for deposits on testnets, but not on the Mainnet.

catsmells avatar Dec 14 '23 18:12 catsmells

Also worth mentioning that MMM handles this differently (gets to the confirm screen) and that both platforms should be consolidated.

@seaona shared two ideas around this.

  1. We should allow to proceed with the flow in Extension as is on mobile (we should not censor anything, and we must empower the user to decide)
  2. We should display a warning for failing transactions in both Mobile and Extension.

@bschorchit

blackdevelopa avatar Jan 08 '24 21:01 blackdevelopa

Update: this issue is present in 11.7.5 and develop. Development build from git id: https://github.com/MetaMask/metamask-extension/commit/9a782e169420a6e4eaed80c9afc6a7b82b2780ab, Chrome (same behavior on Firefox):

https://github.com/MetaMask/metamask-extension/assets/104780023/d8a188b1-f3f5-481d-81d2-1da63eeb8e14

sleepytanya avatar Feb 23 '24 14:02 sleepytanya

Probably related: https://github.com/MetaMask/metamask-extension/issues/21867

sleepytanya avatar Feb 26 '24 00:02 sleepytanya

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

github-actions[bot] avatar Aug 13 '24 22:08 github-actions[bot]

This issue is still present

https://github.com/user-attachments/assets/71f3e285-96c3-430c-9d3c-b4d2f9fc1312

seaona avatar Sep 13 '24 06:09 seaona

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

github-actions[bot] avatar Dec 12 '24 08:12 github-actions[bot]