A
A
aliskhanoff2021-12-27 16:44:34
blockchain
aliskhanoff, 2021-12-27 16:44:34

Simulation of buying/selling ERC20 blockchain tokens on a test service. How to do?

I want to write a service for testing ERC20 tokens for scam (fraud) and one of the signs (I would say that this is the main sign) is the impossibility of selling the token. There are services like BSCheck or TokenSniffer but I don't know what algorithm and testing service they use. Any ideas?

Thank you!

My base setup:
nodejs + nestjs (heroku, netlify)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2021-12-27
@rPman

according to your link, bscheck uses honeypot.is, which in turn works on this blockchain with only one
PancakeSwap for this case is usually scarce)
I can assume that in order not to deal with the contract itself and the blockchain, you can deploy the infrastructure of the exchanger locally on your isolated server, connect it to your node, and for simulation disconnect the node from the Internet immediately before creating an exchange transaction, depending on whether it will be created and at what price (slippage tolerance can be increased to assess how empty the liquidity pool is)
Personally, I would implement this by creating a snapshot of the machine in which the node is running and the application / browser in which the exchanger is open, launching this snapshot with the Internet turned off, creating a transaction, seeing if the transaction turned out or not and deleting this snapshot.

U
Uno, 2021-12-27
@Noizefan

you bro rPman described a too crutch solution for one narrow task. the more "not to understand" - the more "easy to bypass".
And the solution of the general problem comes down to the implementation of a static analyzer of the Solidity code with the necessary rules. What's good is that pieces of code parsing code (code code code code) can be pulled out directly from the solidity parser interpreter from the EVM.
I wouldn't do that on a node.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question