A Java Framework for Smart Contracts