The rapid development of distributed energy resources (DER) in the distribution grid calls for novel control and coordination solutions. Optimal management of DER will enable end-users to decrease their electricity costs and provide crucial services to grid operators. In this paper, a decentralized Optimal Power Flow (OPF) model is used to locally coordinate DER in distribution networks, while considering the network constraints, in a distributed, transparent and secure fashion. To achieve that, a consensus-based distributed optimization algorithm is developed using the general form Alternating Direction Method of Multipliers (ADMM). To enable transparent and verifiable management of the network, the paper provides a comprehensive procedure for the implementation of the decentralized OPF on a private blockchain-smart contracts platform. The performance of the proposed framework is tested using real data from a case study in a residential neighborhood in Amsterdam with different varieties of DER. The implementation procedure on a blockchain-smart contracts platform may be adopted in other problems that require a smart contract to act as a virtual aggregator.