From ba36c97ff78e5f4dad32fc8c4666df4ee9164e09 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Mon, 30 Oct 2023 20:09:37 +0200 Subject: [PATCH] back transfers API change --- vmhost/vmhooks/managedei.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vmhost/vmhooks/managedei.go b/vmhost/vmhooks/managedei.go index a6ffcf439..908bdc300 100644 --- a/vmhost/vmhooks/managedei.go +++ b/vmhost/vmhooks/managedei.go @@ -247,7 +247,7 @@ func (context *VMHooksImpl) ManagedGetMultiESDTCallValue(multiCallValueHandle in // ManagedGetBackTransfers VMHooks implementation. // @autogenerate(VMHooks) -func (context *VMHooksImpl) ManagedGetBackTransfers(esdtTransfersValueHandle int32, callValueHandle int32) { +func (context *VMHooksImpl) ManagedGetBackTransfers(esdtTransfersValueHandle int32, egldValueHandle int32) { metering := context.GetMeteringContext() managedType := context.GetManagedTypesContext() @@ -259,7 +259,8 @@ func (context *VMHooksImpl) ManagedGetBackTransfers(esdtTransfersValueHandle int managedType.ConsumeGasForBytes(multiCallBytes) managedType.SetBytes(esdtTransfersValueHandle, multiCallBytes) - managedType.SetBytes(callValueHandle, transferValue.Bytes()) + egldValue := managedType.GetBigIntOrCreate(egldValueHandle) + egldValue.SetBytes(transferValue.Bytes()) } // ManagedGetESDTBalance VMHooks implementation.