CRYPTO NEWS

My transaction of 0.003 ETH from MEW shows "FAIL"

My transaction of 0.003 ETH from MEW shows “FAIL” in etherscan when checked with Tx.

The required Gas was set as 170000.
No reason is shown on the etherscan page. What must’ve gone wrong? Does the amount bounce back? Need help. Thanks

Faulty Spookyswap transaction

Whenever i try using the spookyswap v2 router to implement swapExactETHForToken function, it ends up sending ftms to a random address and creating a new contract?? I’m using the normal fantom rpc: http://rpc.fantom.network, i’ve tried changing with infura and ank, but the problem persists? ”’ from web3 import Web3 import json private = ” ganache_url::Listen

Whenever i try using the spookyswap v2 router to implement swapExactETHForToken function, it ends up sending ftms to a random address and creating a new contract?? I’m using the normal fantom rpc: http://rpc.fantom.network, i’ve tried changing with infura and ank, but the problem persists?

”’

from web3 import Web3 import json private = '' ganache_url = 'IMPORTYOURURL' infura_url = 'https://mainnet.infura.io/v3/c661b68cc251419397243b93a1d74821' fantom = "http://rpc.fantom.network/" ankr = 'https://rpc.ankr.com/fantom' w3 = Web3(Web3.HTTPProvider(fantom)) wallet = input("Please enter you metamask fantom wallet address:") balance = w3.eth.get_balance(w3.toChecksumAddress(wallet)) if balance<1:     print("Please fund your wallet")  uniswap_router = '0xF491e7B69E4244ad4002BC14e878a34207E38c29' uniswap_factory ='0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3' contract_address = '0xf73e20bb4a7c1a3aa3310b535f1df0e49cf0c8d6' contract_address1 = '0x2d3689A74A62806dA881BaF09383B130Ce55ac80'  with open('abi4.json') as ab4:     swapper_abi4 = json.load(ab4) with open('abi.json') as ab1:     swapper_abi1 = json.load(ab1) #print(swapper_abi1)   contract0 = w3.eth.contract(address=w3.toChecksumAddress(contract_address), abi=swapper_abi1) #contract = w3.eth.contract(address=w3.toChecksumAddress(contract_address1), abi=swapper_abi) contract3 = w3.eth.contract(address=uniswap_router,abi = swapper_abi4)  #Spend token i.e ftm token_in =   w3.toChecksumAddress('0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83')         #Contract address of token and amount to purchase token_out = w3.toChecksumAddress(input("Enter Token Address to buy: "))#handle_event[2] #Input contract address for the token to purchase                                          amount_in = w3.toWei(input("How much to spend? "), 'ether')   amount_out_min = contract0.functions.getAmountOutMin(token_in, token_out, amount_in).call() print(w3.fromWei(amount_out_min,'ether')) #build a transaction in a dictionary  tx = { 'from': wallet, #'to': contract_address1, 'value': amount_in, 'gas': 250000, 'gasPrice': w3.toWei('50', 'gwei'), 'nonce': w3.eth.getTransactionCount(wallet), 'chainId':250 }  #buy function #contract0.functions.swap(token_in, token_out, amount_in,amount_out_min,    wallet).buildTransaction(tx) #contract.functions.swap(token_in,token_out,amount_in).buildTransaction(tx) time = 1000000 contract3.functions.swapExactETHForTokens(amount_out_min,  [token_in,token_out],wallet,time).buildTransaction(tx)  #sign the transaction signed_tx = w3.eth.account.sign_transaction(tx, private)  #send transaction tx_hash = w3.eth.sendRawTransaction(signed_tx.rawTransaction)  #get transaction hash print(w3.toHex(tx_hash)) 

”’

My transaction of 0.003 ETH from MEW shows "FAIL"

Shopping cart
There are no products in the cart!
Continue shopping
0