diff --git a/chain/types/ethtypes/eth_transactions.go b/chain/types/ethtypes/eth_transactions.go index e94215d60e0..05a2ee2c052 100644 --- a/chain/types/ethtypes/eth_transactions.go +++ b/chain/types/ethtypes/eth_transactions.go @@ -108,9 +108,6 @@ func EthTxArgsFromMessage(msg *types.Message) (EthTxArgs, error) { return EthTxArgs{}, xerrors.Errorf("failed to read params byte array: %w", err) } - if paramsReader.Len() != 0 { - return EthTxArgs{}, xerrors.Errorf("extra data found in params") - } if len(params) == 0 { // Otherwise, we don't get a guaranteed round-trip. return EthTxArgs{}, xerrors.Errorf("cannot invoke contracts with empty parameters from an eth-account") @@ -118,6 +115,10 @@ func EthTxArgsFromMessage(msg *types.Message) (EthTxArgs, error) { } } + if paramsReader.Len() != 0 { + return EthTxArgs{}, xerrors.Errorf("extra data found in params") + } + return EthTxArgs{ ChainID: build.Eip155ChainId, Nonce: int(msg.Nonce),