-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Hi,
I think the transaction/cost endpoint is broken for cross-shard transactions.
I attach the reproduction. It has the extension .txt but it should be replaced by .http (I could not attach a .http file directly here). Then this .http file can be ran in VSCode.
I have to account on testnet:
- account 1 in shard 1: erd1ete948n8jh4aq0c26sla4nfus2dm206tyylcr4y929l73887g0nsnsy93r
- account 2 in shard 2: erd1admrhe6atmrxdd62dalwwn0j69pemx2c0jcf9cflp20sl89qk6aq56ru6d
Both accounts own some SFT token MEXFARM-c070e3-9426.
In the file I attached, you can find 2 POST requests to transaction/cost endpoint.
In request 1, account 1 (in shard 1) transfers a quantity X of MEXFARM-c070e3-9426 to the compoundRewards method of MEX farm SC. The cost estimation of this call is: 17815967. This call is an intrashard one.
In request 2, account 2 (in shard 2) transfers same quantity X of MEXFARM-c070e3-9426 to the compoundRewards method of MEX farm SC. The cost estimation of this call is: 1052300, i.e. 17 times lower than the call for account 1.
Request 1 and request 2 have the same data field and are barely the same transactions. The only difference is that one is made by an account in shard 1 and the other by an account in shard 2. Hence, having a 17x difference between cost estimation seems there is something in proxy's estimation.
I hope my explanations are clear enough. Let me know if I can help more.
Lucas