Hello,
I have the same smart contract deployed on mumbai as I do on ropsten to mint nfts, nothing too fancy. I then set up some python code with the web3 library to call the minting function. The code works properly when I test on ropsten but it fails when I try on mumbai. I have concerns about this failing on the polygon main net as well. I am using the proper chainId for each respective network. The error code I get when signing a transaction and sending the raw version is: {‘code’: -32000, ‘message’: ‘invalid sender’} . Do you know what could be going on?
Thanks
the code looks something like what’s below
nonce = w3.eth.get_transaction_count(acct.address)
test = 'https://ipfs.io/ipfs/mydata'
tx_hash = contract_instance.functions.autoMint(acct.address, test).buildTransaction({
'from': acct.address,
'chainId': 80001, # mumbai
#'chainId': 3, # ropsten
'gas': int(1e6),
'maxFeePerGas': w3.toWei('2', 'gwei'),
'maxPriorityFeePerGas': w3.toWei('1', 'gwei'),
'nonce': nonce
})
signed_txn = w3.eth.account.sign_transaction(tx_hash, private_key=acct.privateKey)
tx_sent = w3.eth.send_raw_transaction(signed_txn.rawTransaction)