I want to make a function that allows you to send tokens from one owner to another.
nonce = w3.eth.getTransactionCount(from_['address'])
unsigned_transaction = contract.functions.transferFrom(
from['address'],
to['address'],
1
).buildTransaction({
'chainId': 1,
'gas': 70000,
'gasPrice': w3.toWei('1', 'gwei'),
'nonce': nonce,
})
signed_transaction = sign_transaction(
unsigned_transaction,
from['private']
)
tx_ref = send_transaction(signed_transaction)
But I get the following error:
ValueError: {'code': -32000, 'message': 'invalid sender'}
What am I doing wrong?
Who in this case is the sender? What's wrong with him?