Open hui-an-yang opened 1 year ago
Tried changing operationResults to get operationObject from confirmation() in Operation parent class, it added complexity to unit test of each operation classes. The operation class is not pure and we'll need to mock rxjs observable results
Description
Our current design of operationResults is using the preapplyOperations response while it works for many cases but when it comes to 2 contract calls in the same block the first one modify the storage and the second contract call will hit failWith in contract due to the first contract call change our second operationResults still reflect it's preapplyResponse which the operation succeed.
Steps To Reproduce
Expected behavior op2 operationResults should throw an operationError that it hit failwith in contract because of the storage doesn't have enough to be deducted.
Screenshots Our current design made op2 operationResults shows the contract call succeed which isn't correct on chain and indexer
Additional context
We might want to reference what octez-client is doing after injecting for example. Here's a link for reference