“…Else if index divided by 2 is equal to 1 then Pins is of type "Eight" Else if index divided by 2 is equal to 2 then Pins is of type "Twelve" Else Pins is of type "Fourteen" End if Call Remove Products function passing gate, pins, and number of items from above. End for Emit event to show that given number of items were removed from the supply chain due to being defectiveThe bridging transaction contract algoritms are given in Algorithms(9)(10)(11)(12)(13)(14); every transaction is characterized by the following data organized into a struct: 1) Transaction state is shown in Algorithm 9, 2) A list of items Ids is created in Algoritm 10, 3) A total amount due (in cents) for all the items in the cart, 4) A list of 3 dates (creation date, completion/payment date, refund date) is created, 5) Seller's signature of approval shown in Algorithm 11, 6) Buyer's signature of approval shown in Algorithm 12.Algorithm 9. Create transaction -Creates a new transactionReceive receipt number as input Increment total number of transactions by one Set state of new transaction to "Created" Set first date of dates list for the new transaction as current block time Emit an event to signal a new transaction A list of items Ids is created in Algorithm 10 where transaction items list is mapped by the receipt number and item price is mapped by the receipt number, a total amount due (in cents) for all the items is added in the cart, and a list of 3 dates (creation date, completion/payment date, refund date) is created.For item price in input list of item prices Add item price to transaction total price mapped by the receipt number End for Emit an event to show that the transaction characterized by the given receipt number was updated with a new total.Seller's signature required for approval is shown in Algorithm 11 in which seller signs the request, then the request is sent by bridging to buyer.…”