Smart contract code for monetization of IoT Devices