Secure smart contracts for Hyperledger Fabric