You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
When calling a payable fallback, the msg.value is equal to the wei attached as value.
Current Behavior
When calling a payable fallback, the msg.value is equal to twice the wei attached as value.
(Running npx ganache-cli --fork https://mainnet.infura.io/metamask with version Ganache CLI v6.3.0 (ganache-core: 2.4.0), the msg.value seems to double.)
Possible Solution
I can't find the issue.
Steps to Reproduce (for bugs)
Run npx ganache-cli --fork https://mainnet.infura.io/metamask
Just jotting down some of the research i've done on this one... This issue is caused by ForkedBlockchain.js's storageTrieCache object being shared between eth_sendTransaction and eth_estimateGas calls. eth_estimateGas essentially poison's the live cache instead of cloning and using it's own.
Expected Behavior
When calling a
payable
fallback, themsg.value
is equal to the wei attached as value.Current Behavior
When calling a
payable
fallback, themsg.value
is equal to twice the wei attached as value.(Running
npx ganache-cli --fork https://mainnet.infura.io/metamask
with version Ganache CLI v6.3.0 (ganache-core: 2.4.0), themsg.value
seems to double.)Possible Solution
I can't find the issue.
Steps to Reproduce (for bugs)
npx ganache-cli --fork https://mainnet.infura.io/metamask
balanceOf
for the address that deposited. The balance is2000000000000000000
wei.Context
The error isn't present when connecting to Kovan or Mainnet.
Your Environment
The text was updated successfully, but these errors were encountered: