-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow one to parse the outcome of contract calls which are inner transactions (relayed V3) #495
Conversation
* Generally speaking, useful for Relayed V3 transactions. | ||
*/ | ||
public transactionOnNetworkToOutcomesOfInnerTransactions( | ||
transactionOnNetwork: ITransactionOnNetwork, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the input is a ITransactionOnNetwork
, this works both for the TransactionOnNetwork
from the satellite package sdk-network-providers
, and for the class within sdk-core/networkProviders
(long time support rationale).
* Artificially converts an inner transaction (of a relayed V3) to a transaction on the network, | ||
* by matching the inner transaction with its corresponding smart contract result. | ||
*/ | ||
private convertInnerTransactionToTransactionOnNetwork( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll keep this private, since it's a temporary workaround, until proper VM output is returned from the Proxy & API.
@@ -26,6 +26,10 @@ export interface ITransactionOnNetwork { | |||
receipt: ITransactionReceipt; | |||
contractResults: IContractResults; | |||
logs: ITransactionLogs; | |||
|
|||
// TODO: In a future major release, make these required (empty is allowed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, maybe, we'll completely drop these interfaces, and use simple DTOs (according to the specs).
/** | ||
* @deprecated This will be remove with the next release (replaced by the `ITransaction` interface from "src/interface.ts"). | ||
*/ | ||
export type ITransactionNext = ITransactionAsInSpecs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, ITransactionNext
was almost the same as ITransactionAsInSpecs
, with the exception of:
ITransactionNext.relayer
was optional,ITransactionAsInSpecs.relayer
isn't (but empty is allowed)ITransactionNext.innerTransactions
was optional,ITransactionAsInSpecs.innerTransactions
isn't (but empty is allowed).
This should not be considered a breaking change, since it's an alteration of an interface that's merely used as the substitute of Transaction
within the network provider components, newly moved to src/networkProviders
.
…plement (simplified) the transformation (finding the contract return data).
…the contract outcome to the contract outcome parser.
Not needed anymore (relayed V3 will not stay in the current format). |
transactionOnNetworkToOutcomesOfInnerTransactions
.