Designing Secure Access Control For Smart Contracts