Digital supply chain through dynamic inventory and smart contracts