Research Article

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

Algorithm 2

Route Offer function.
1: function ROUTE OFFER(ROB, ROV)
2:  Transfer tokens from the function caller to the block producer.
3:  if the function caller address is not in and the number of offers is less than three then
4:   Transfer tokens from the function caller to the current contract address
5:   Set to Offer
6:  end if
7: end function