0

I wrote a simple python program whose aim is to swap the native token of the underlying chain, e.g., ETH, AVAX, for other tokens. In this case, my account holds 5+ AVAX and I am trying to do the following:

qty_out = 10*(10**mim_contract.decimals())      [10 MIM] 
path = [wavax_contract.address(), mim_contract.address()]
max_delay_sec = 1000int(time.time()+15)
avax_decimals = 18

And then I call this method

router_contract.swapAVAXForExactTokens(qty_out, path, user.address, max_delay_sec,
                                    {'from':user.address,'value':10**avax_decimals})

The program breaks, returning the following:

the method eth_sendTransaction is not available

I suspect this might be cause by a missing authorization to swap coins. Is there anyone who experienced something like this? If so, may I ask you for some guidance?

Thanks

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.