The Ultimate Guide for a Smart Contract