# Ethereum-like Transaction Binary Format
Waves node supports Ethereum-like transactions (only Legacy) and interprets them as a dApp script invocation or token transfer, depending on the transaction content. More about Ethereum-like transaction support
Ethereum-like transaction is enabled by feature #17 “Ride V6, MetaMask support”.
message SignedTransaction {
Transaction transaction = 1;
oneof transaction {
Transaction waves_transaction = 1;
bytes ethereum_transaction = 3;
}
repeated bytes proofs = 2;
}
The ethereum_transaction
field contains the entire Ethereum-like transaction bytes, including the ECDSA signature (values v
, r
, s
).
The proofs
array is empty in case of Ethereum-like transaction.
# Fields Interpretation
Although the protobuf schema does not distinguish fields of an Ethereum-like transaction, the Waves node parses the structure and interprets the fields as follows when validating and executing the transaction:
gasLimit
is treated as a transaction fee. Fee can only be in WAVES.gasPrice
must be 10, otherwise the transaction is rejected.nonce
is treated astimestamp
.If the
value
field is non-empty, the transaction is interpreted as a WAVES transfer. In this case thedata
field must be empty.If the
data
field contains an invocation of thetransfer
method of the ERC20 smart contract and theto
field contains the first 20 bytes of a custom token ID, the transaction is interpreted as a transfer of that token.The first 20 bytes of the token ID uniquely define the token, since there are no tokens on the blockchain whose first 20 bytes of ID are the same.
In other cases, the transaction is interpreted as an invocation of dApp script. The last argument of the callable function must be an array; it is treated as a list of payments attached to the call.