Check whether parameter is Unit when transferring to an implicit account
Clarification and motivation
When transferring to an implicit account, the reference implementation checks that the transfer param is of type Unit
.
However, the Michelson.Runtime
does not, and the transfer succeeds regardless of the param type.
We should change the Michelson.Runtime
's behaviour to match that of the reference implementation.
Acceptance criteria
The following test fails on both the emulator and on a real network:
nettestScenarioCaps "" $ do
addr <- newFreshAddress "alias"
transfer TransferData
{ tdFrom = nettestAddress
, tdTo = AddressResolved addr
, tdAmount = toMutez 1
, tdEntrypoint = DefEpName
, tdParameter = [mt||]
}