Protecting Solidity Code from Common Attacks