Research Article

A Blockchain-Based Contractual Routing Protocol for the Internet of Things Using Smart Contracts

Algorithm 3

Route Accept function.
1: function ROUTE ACCEPT(INTERMEDIARY)
2:  Transfer tokens from the function caller to the block producer.
3:  if the function caller is then
4:   Move the to
5:   Transfer the tokens of the other intermediary devices back
6:  end if
7: end function