quick question regarding hyperledger fabric transactions in JS.
Say, I have an abstract asset called HotBeverage:
abstract asset HotBeverage identified by assetId {
o String assetId
o Double price
}
And from that abstract class, I create two more assets:
asset HotTea extends HotBeverage {
o String teaType
}
and
asset HotCoffee extends HotBeverage {
o String coffeeType
}
OK, fairly straight forward so far. Now say I want to create a transaction that adds 0.50 to the price of all HotBeverages. Transactions currently cannot accept abstract assets, so it means I need to create two separate transactions :'(
transaction changeTeaPrice {
--> HotTea Tea
o Double newPrice
}
And
transaction changeCoffeePrice {
--> HotCoffee coffee
o Double newPrice
}
I really want to create just one transaction that would work on all HotBeverages instead of implementing them individually. Can this be done?
Thanks!!