Blockchain enforces nested conditions in contracts