Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msg.value is not the same as the actual amount that gets sent to a smart contract #1352

Open
Shr1ftyy opened this issue Feb 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Shr1ftyy
Copy link

Shr1ftyy commented Feb 28, 2025

Describe the bug

When sending ether to a smart contract on the subtensor's evm, the msg.value is not the as the actual that is deposited - it appears that msg.value does not consider the 0.00005 TAO fee. This is very different to how i.e. the Ethereum Mainnet evm behaves.

To Reproduce

  • Deploy a smart contract with a payable modifier in solidity
  • Call the function whilst sending it ether (TAO).
  • Notice that the amount that gets deposited is 0.00005 TAO less than what you intended to deposit.

Expected behavior

msg.value should reflect the actual amount that gets deposited.

@Shr1ftyy Shr1ftyy added the bug Something isn't working label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant