Skip to content

Commit

Permalink
back transfer test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Oct 30, 2023
1 parent ba36c97 commit 5541292
Showing 5 changed files with 42 additions and 2 deletions.
Binary file modified test/features/composability/forwarder/output/forwarder.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -79,6 +79,17 @@
"str:BackTransfer",
"0"
]
},
{
"address": "sc:forwarder",
"endpoint": "str:forward_sync_retrieve_funds",
"topics": [
"str:back_tranfers",
"1000"
],
"data": [
""
]
}
],
"gas": "*",
Original file line number Diff line number Diff line change
@@ -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": "*",
Original file line number Diff line number Diff line change
@@ -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": "*",
5 changes: 3 additions & 2 deletions vmhost/contexts/managedType.go
Original file line number Diff line number Diff line change
@@ -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 {

0 comments on commit 5541292

Please sign in to comment.