Skip to content

Commit db58cd3

Browse files
authored
Update difference-with-ethereum.md
Adding recommendation to use InvokeEVM method number for all sends to f410f/0x
1 parent 8f3294a commit db58cd3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

smart-contracts/filecoin-evm-runtime/difference-with-ethereum.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ The `CALLCODE` opcode has not been implemented. Use the newer `DELEGATECALL` opc
4040

4141
In Ethereum, `SELFDESTRUCT` is the only way to send funds to a smart contract without giving the target smart contract a chance to execute code.
4242

43-
In Filecoin, any actor can use `method 0`, also called a bare-value send, to transfer funds to any other actor without invoking the target actor’s code. You can think of this behavior as having the suggested [`PAY` opcode](https://eips.ethereum.org/EIPS/eip-5920) already implemented in Filecoin.
43+
In Filecoin, any actor can use `method 0`, also called a bare-value send, to transfer funds to any other actor without invoking the target actor’s code. You can think of this behavior as having the suggested [`PAY` opcode](https://eips.ethereum.org/EIPS/eip-5920) already implemented in Filecoin. However by default, Solidity smart contracts do not accept bare value transfers, unless the author implements the [receive() or fallback() function](https://docs.soliditylang.org/en/v0.8.17/contracts.html#receive-ether-function). For more information see [FIP Discussion #592](https://github.com/filecoin-project/FIPs/discussions/592#discussioncomment-4819619).
44+
45+
Therefore in case the recipient is a smart contract, **it is recommended to always use the `InvokeEVM` `method 3844450837` for sends to prevent loss of funds** when sending to an `f410f`/`0x` address recipient.
4446

4547
## Precompiles
4648

0 commit comments

Comments
 (0)