Skip to content

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

Description

@sbinabdullah

Describe the bug

When sending ether to a smart contract on the subtensor's evm, the msg.value is not the same as the actual amount 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.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions