Web3.py Error – ValueError: {‘code’: -32000, ‘message’: ‘already known’}

web3.py

I am performing a transaction to send an ERC20 and I keep getting this error:

ValueError: {'code': -32000, 'message': 'already known'}

I'm assuming this means that this transaction is already in the mempool or something? Looking for some clarifications though.

Best Answer

Partial answer...

I'm assuming this means that this transaction is already in the mempool or something?

Yes. From tx_pool.go:

// ErrAlreadyKnown is returned if the transactions is already contained
// within the pool.
ErrAlreadyKnown = errors.New("already known")

But it's not immediately clear from the code what conditions have to be met for this error to be set, so it's difficult to suggest a solution.

Related Topic