Research Article
A Blockchain-Based Contractual Routing Protocol for the Internet of Things Using Smart Contracts
1: function ROUTE REQUEST(DESTINATION, RRB, RRE, BLACKLIST, PARENTADDRESS(OPTIONAL), HOP(OPTIONAL) ) | 2: Transfer tokens from the function caller to the block producer. | 3: Transfer tokens from the function caller to the current contract address | 4: Set to | 5: Set to | 6: if this is an original smart contract then | 7: Set to | 8: end if | 9: if this is an intermediary smart contract then | 10: Set to Hop | 11: Set to ParentAddress | 12: end if | 13: Set to | 14: end function |
|