diff --git a/test/features/composability/forwarder/output/forwarder.wasm b/test/features/composability/forwarder/output/forwarder.wasm index dfd5b547a..fbcd89e4f 100755 Binary files a/test/features/composability/forwarder/output/forwarder.wasm and b/test/features/composability/forwarder/output/forwarder.wasm differ diff --git a/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json index 38a45c7e2..6b52f7016 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json @@ -79,6 +79,17 @@ "str:BackTransfer", "0" ] + }, + { + "address": "sc:forwarder", + "endpoint": "str:forward_sync_retrieve_funds", + "topics": [ + "str:back_tranfers", + "1000" + ], + "data": [ + "" + ] } ], "gas": "*", diff --git a/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json index 31ad91a9f..846db902e 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json @@ -86,6 +86,20 @@ "str:TEST-TOKENA", "1000" ] + }, + { + "address": "sc:forwarder", + "endpoint": "str:forward_sync_retrieve_funds", + "topics": [ + "str:back_tranfers", + "0", + "str:TEST-TOKENA", + "0", + "1000" + ], + "data": [ + "" + ] } ], "gas": "*", diff --git a/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json index c326dbe98..19510fab1 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json @@ -95,6 +95,20 @@ "01", "sc:forwarder" ] + }, + { + "address": "sc:forwarder", + "endpoint": "str:forward_sync_retrieve_funds", + "topics": [ + "str:back_tranfers", + "0", + "str:NFT-000001", + "5", + "1" + ], + "data": [ + "" + ] } ], "gas": "*", diff --git a/vmhost/contexts/managedType.go b/vmhost/contexts/managedType.go index b26ebe089..99074fd8f 100644 --- a/vmhost/contexts/managedType.go +++ b/vmhost/contexts/managedType.go @@ -5,11 +5,12 @@ import ( "crypto/elliptic" "encoding/binary" "errors" - vmcommon "github.com/multiversx/mx-chain-vm-common-go" "io" basicMath "math" "math/big" + vmcommon "github.com/multiversx/mx-chain-vm-common-go" + "github.com/multiversx/mx-chain-core-go/core/check" logger "github.com/multiversx/mx-chain-logger-go" "github.com/multiversx/mx-chain-vm-go/math" @@ -552,7 +553,7 @@ func (context *managedTypesContext) NewManagedBufferFromBytes(bytes []byte) int3 return mBufferHandle } -// SetBytes sets the bytes given as value for the managed buffer +// SetBytes sets the bytes given as value for the managed buffer. Will create managed buffer if it doesn't exist. func (context *managedTypesContext) SetBytes(mBufferHandle int32, bytes []byte) { _, ok := context.managedTypesValues.mBufferValues[mBufferHandle] if !ok {