from web3 import Web3 infura_url = "https://mainnet.infura.io/v3/your_key" # Replace your_key with your Infura API id key web3 = Web3(Web3.HTTPProvider(infura_url)) your_wallet_address = 'wallet_address' # account from which we'll pay q deplozment, some 0.3 ETH in the wallet to be safe, gas usege should be 5 million units x gwei + tip your_wallet_address_private_key = 'private_key' # private key of your above wallet address mineq_contract_address = '0xB207b52fe740d8981A78f1714c7089B662AA6c1f' mineq_abi = '[{"inputs":[],"name":"deployQContract","outputs":[],"stateMutability":"nonpayable","type":"function"}]' contract = web3.eth.contract(address=mineq_contract_address, abi=mineq_abi) payable_amount = 0 payable_amount = int(payable_amount * 10**18) gwei_limit = 13 # change to gwei at which you want to execute deplozment wei_amount = int(gwei_limit * 1e9) tip = int(1 * 1e9) # change to tip, if more deployers submit contract at the smae time, the one with highest tip will be likely the winner nonceNumber = web3.eth.get_transaction_count(web3.to_checksum_address(your_wallet_address)) tx = contract.functions.deployQContract().build_transaction({ 'from': your_wallet_address, 'value': payable_amount, 'nonce': nonceNumber, 'maxFeePerGas': wei_amount, 'maxPriorityFeePerGas': tip, 'type':2, 'gas': 6125000 }) signed_tx = web3.eth.account.sign_transaction(tx, your_wallet_address_private_key) tx_hash = web3.eth.send_raw_transaction(signed_tx.rawTransaction) print("Transaction Hash:", web3.to_hex(tx_hash))