This paper presents a lightweight machine learning framework for detecting six classes of Ethereum smart contract vulnerabilities directly from raw Solidity source code. Its main contribution is the combination of word and character-level TF-IDF features with domain-specific Solidity pattern counts, avoiding the need for bytecode compilation or graph construction. The study also uses a leakage-controlled SMOTE and vectorization pipeline, making the evaluation more methodologically reliable. Among six classifiers, LightGBM achieves the strongest performance, reaching 97.74% test accuracy and 97.07% cross-validated accuracy. A further contribution is the SHAP analysis, which connects influential model features to recognizable constructs such as .call(), delegatecall, block.timestamp, and block.number, making the predictions more interpretable for smart contract security analysis.
