Skip to content

How to simulate smart contract calls (write)? #2367

Answered by ysfaran
ysfaran asked this question in Q&A
Discussion options

You must be logged in to vote

I think I just solved it.. I used the PancakeSwap router contract to swap tokens and used swapExactTokensForETHSupportingFeeOnTransferTokens which seems to catch all errors and just handout a [] in case of failures.

If I use swapExactTokensForETH it actually works and outputs correct errors with callStatic.

Replies: 6 comments 22 replies

Comment options

You must be logged in to vote
1 reply
@lidd77
Comment options

Answer selected by ysfaran
Comment options

You must be logged in to vote
15 replies
@daron4ever
Comment options

@juloxrox
Comment options

@zemse
Comment options

@daron4ever
Comment options

@zemse
Comment options

Comment options

You must be logged in to vote
5 replies
@lidd77
Comment options

@lidd77
Comment options

@nimo862
Comment options

@lidd77
Comment options

@Freemandaily
Comment options

Comment options

You must be logged in to vote
1 reply
@lidd77
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet