Adapting Smart Contracts for Compliance with Cryptocurrency Regulations