File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -841,6 +841,16 @@ func TransferValueExecuteWithTypedArgs(
841841 }
842842 }
843843
844+ data := ""
845+ if contractCallInput != nil {
846+ data = makeCrossShardCallFromInput (contractCallInput .Function , contractCallInput .Arguments )
847+ }
848+
849+ if host .IsBuiltinFunctionCall ([]byte (data )) {
850+ WithFaultAndHost (host , vmhost .ErrTransferValueOnESDTCall , runtime .BaseOpsErrorShouldFailExecution ())
851+ return 1
852+ }
853+
844854 if host .AreInSameShard (sender , dest ) && contractCallInput != nil && host .Blockchain ().IsSmartContract (dest ) {
845855 logEEI .Trace ("eGLD pre-transfer execution begin" )
846856 vmOutput , err := executeOnDestContextFromAPI (host , contractCallInput )
@@ -854,11 +864,6 @@ func TransferValueExecuteWithTypedArgs(
854864 return 0
855865 }
856866
857- data := ""
858- if contractCallInput != nil {
859- data = makeCrossShardCallFromInput (contractCallInput .Function , contractCallInput .Arguments )
860- }
861-
862867 err = metering .UseGasBounded (uint64 (gasLimit ))
863868 if WithFaultAndHost (host , err , runtime .UseGasBoundedShouldFailExecution ()) {
864869 return 1
You can’t perform that action at this time.
0 commit comments