Skip to content
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

EN-8181/ReturnData-to-transfer-for-callback #2898

Conversation

sasurobert
Copy link
Contributor

Added new flags and fixed a scenario which was not treated the same way as in arwen.

# ReturnDataToLastTransferEnableEpoch represents the epoch when return data is added to last output transfer for callbacks
ReturnDataToLastTransferEnableEpoch = 5

# ArwenESDTFunctionsEnableEpoch represents the epoch the new ESDT functions are enabled in arwen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the epoch when the new ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -52,6 +52,12 @@
# BlockGasAndFeesReCheckEnableEpoch represents the epoch when gas and fees used in each created or processed block are re-checked
BlockGasAndFeesReCheckEnableEpoch = 4

# ReturnDataToLastTransferEnableEpoch represents the epoch when return data is added to last output transfer for callbacks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when returned

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -1808,7 +1812,7 @@ func (sc *scProcessor) useLastTransferAsAsyncCallBackWhenNeeded(
tx data.TransactionHandler,
result *smartContractResult.SmartContractResult,
) bool {
if len(vmOutput.ReturnData) > 0 {
if len(vmOutput.ReturnData) > 0 && sc.flagReturnDataToLastTransfer.IsSet() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!sc.flagReturnDataToLastTransfer.IsSet() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@iulianpascalau iulianpascalau self-requested a review March 11, 2021 11:26
@sasurobert sasurobert merged commit 71225cf into feat/eip-esdt-local-mint Mar 11, 2021
@sasurobert sasurobert deleted the EN-8181/ReturnData-to-asyncCallBack-transfer branch March 11, 2021 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants