When calling another SC from my SC, when accessing the call_value() inside the callback, the call_value does contain the tokens of the initial call instead of the sent tokens coming from the asynchronously called SC.
I created a minimal reproduction project you can find here (branch: bug/callvalue)
https://github.com/janniksam/mvx_sellnftbug/tree/bug/callvalue
Here are the basic steps, pretty straightforward:
- Transfer some EGLD to the endpoint
reproduce on the first smart contract
- The endpoint
reproduce calls the second smart contracts foo endpoint and forward the EGLD to it.
- The called second smart contract sends back any ESDT token and returns
- The first smart contracts callback
foo_callback gets called. When trying to use call_value().single_esdt() inside that callback it will fail.
Is there ANY temporary workaround for this?
I'm currently stuck and cannot proceed, because I definitely need to know the amount I get back from the second SC (which in my real scenario is created by third party).
When calling another SC from my SC, when accessing the call_value() inside the callback, the call_value does contain the tokens of the initial call instead of the sent tokens coming from the asynchronously called SC.
I created a minimal reproduction project you can find here (branch: bug/callvalue)
https://github.com/janniksam/mvx_sellnftbug/tree/bug/callvalue
Here are the basic steps, pretty straightforward:
reproduceon the first smart contractreproducecalls the second smart contractsfooendpoint and forward the EGLD to it.foo_callbackgets called. When trying to usecall_value().single_esdt()inside that callback it will fail.Is there ANY temporary workaround for this?
I'm currently stuck and cannot proceed, because I definitely need to know the amount I get back from the second SC (which in my real scenario is created by third party).