'Calculate buy/sell tax token bep20 simulating transaction

I think I have searched many places for this answer, but I can't find anyone who explains what functions can achieve this with. It can be done through functions of a smart contract (solidity). So I come back to my question :( how can you simulate a bep20 (bsc) token buy/sell transaction? Without sending it to the blockchain obviously.

As far as my logic goes is that to obtain the buy/sell tax I need to simulate a purchase transaction that is not sent to the blockchain... With that I can calculate according to the number of tokens I have received, how many have been discounted, and so finally know how much was the percentage of buy tax. The same for sell tax..

Can someone give me an idea please? :(

I have seen that some mention to be able to simulate the use of "BatchRequest" or "eth_call", but it seems to me that it is more to simulate transactions of sending a TRANSFER type token from one wallet to another



Solution 1:[1]

Only .Net Core runs on Linux.

You don't need an IDE to run it, there is a command for everything so you can simply open a command prompt and run everything.

Use this as a reference : https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet

A good editor for Linux is Rider. VsCode is a glorified text editor with plugins and if you require a proper thing then I recommend a proper code editor.

I've done some development on Ubuntu and it was very good actually, everything runs as expected.

Solution 2:[2]

if you have installed dotnet-sdk then open terminal and go to project directory and write dotnet run else write snap install dotnet-sdk and export PATH="/snap/bin/:$PATH" replace /snap/bin/ to your directory

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andrei Dragotoniu
Solution 2 user16967887