Python 发送以太坊事务失败(发送方无效)

Python 发送以太坊事务失败(发送方无效),python,ethereum,Python,Ethereum,我正在尝试发送以太坊事务 mainAddress = Web3.toChecksumAddress('0x0000000MAINADRESSS000000000') nonce = web3.eth.getTransactionCount(mainAddress) print(nonce) createPair = factoryC.functions.createPair(cwjContract,yorkieContract).buildTransaction({ 'cha

我正在尝试发送以太坊事务

mainAddress = Web3.toChecksumAddress('0x0000000MAINADRESSS000000000')

nonce = web3.eth.getTransactionCount(mainAddress)
print(nonce)

createPair = factoryC.functions.createPair(cwjContract,yorkieContract).buildTransaction({
        'chainId':56, 'gas': 300000,'gasPrice': web3.toWei('10','gwei'), 'nonce':nonce
    })


signed_tx = web3.eth.account.sign_transaction(createPair, private_key=config.private)

tx_hash = web3.eth.sendRawTransaction(signed_tx.rawTransaction)

print(web3.toHex(tx_hash))
当我运行它时,会出现以下错误:

ValueError:{'code':-32000,'message':'invalid sender'}

但我绝对肯定我使用了正确的地址和私钥