Discrepancies between tx sent and etherscan

Hello!
I sent a couple of transaction to mint an nft that had a short minting window. I got the transaction hash right away. The transactions didn’t appear in etherscan (or any other blockchain scanner for that matter) until ~35 minutes later, and the transactions appear failed. The gas that appears in the tx seems to have been defaulted by infura. I sent the transaction like so where nonce was previously calculated as well as estimate for running the function and any other value required in the transaction.

transaction = contract_object.functions.mintTokens(nft_qty).buildTransaction({
‘from’: my_account,
‘nonce’: nonce,
‘gas’: estimate,
‘maxFeePerGas’: web3.toWei(gasPrice+gas_adder+maxPriorityFeePerGas, ‘gwei’),
‘maxPriorityFeePerGas’: web3.toWei(maxPriorityFeePerGas, ‘gwei’),
‘value’: web3.toWei(nft_cost*nft_qty, ‘ether’)
})

#printing the amount sent for maxFeePerGas
#print("gas sent was: ", gasPrice+gas_adder+maxPriorityFeePerGas)
#output was:
6502

#here goes all the web.eth.account.sign_transaction, web3.eth.send_raw_transaction, etc…

The issues:

  1. The transaction didn’t appear in etherscan until ~35 minutes after I already had the tx_hash
  2. The amount of gas fee burnt doesn’t correspond with the maxFeePerGas that I put.

Am I sending something wrong?

Hi @dcapeluto, and welcome to the Infura community!

As far as your issues:

  1. You will receive a tx_hash regardless of when the tx gets mined, so it will show up before you can see it on Etherscan.
  2. What was the gas fee burnt compared to the maxFeePerGas? If the actual gas fee was lower than the masFeePerGas, that makes sense, as the maxFeePerGas is the maximum fee you as the user are willing to pay the block producer for including your transaction.